Cylindrical and Spherical Coordinates

In cylindrical coordinates, the xy -plane is transformed to polar coordinates, thus resulting in points in 3 dimensions being located using the polar variables r  and theta , along with the vertical displacement z.

[Maple OLE 2.0 Object]

To plot a function r = f(z,theta)  in cylindrical coordinates, we simply add the option "coords=cylindrical" to the plot3d command.  For example, let's plot the function r= 1 in cylindrical coordinates.

>    plot3d(1,theta=0..2*Pi,z=-1..1,coords=cylindrical);

>   

In cylindrical coordinates, r  is the distance to the given point from the z -axis.  Thus, the graph in cylindrical coordinates of the function r = k for k  constant is a cylinder, as is illustrated by the graph of the function r= 1 above.  Let's look at another example.  

Example:

Let's graph the function r = theta/2+1  in cylindrical coordinates for theta  = 0..6 Pi  and for z= -1..1.  

>    plot3d(theta/2+1,theta=0..6*Pi,z=-1..1,coords=cylindrical);

>   

Notice that the result is less than satisfactory because the partition of the interval for theta  is too coarse.  Let's try again

>    plot3d(theta/2+1,theta=0..6*Pi,z=-1..1,coords=cylindrical,grid=[80,10]);

>   

In spherical coordinates, a point P  is located in three dimensional space using the distance from the origin to P, the polar angle theta , and the angle phi  formed with the positive z -axis.

[Maple OLE 2.0 Object]

To plot a function rho = f(phi,theta)  in spherical coordinates, we use the plot3d command with the option "coords = spherical".  For example, the graph of rho  = k  where k  is constant is a sphere of radius k , as we illustrate below by plotting rho = 1 .  

>    plot3d(1,theta=0..2*Pi,phi=0..Pi,coords=spherical,scaling = constrained, axes = normal);

As another example, let us graph the spherical function rho = sec(phi) .  

>    plot3d(sec(phi),theta=0..2*Pi,phi=0..Pi,coords=spherical,axes=normal,view=[-1..1,-1..1,0..2]);

>   

Surprised?  The function rho = sec(phi)  is the same as rho*cos(phi) = 1 , which in cartesian coordinates is z  = 1.