To plot graphs in cylindrical coordinates, there are two methods.
If given z=f(r), use plot3d with cylindrical coordinates.
| > | plot3d([r*cos(theta), r*sin(theta), r^3*cos(theta)-1], r=0..1, theta=0..2*Pi); |
The other method is to use cylinderplot if given r=f(z). For example, to plot r=sqrt(1+z):
| > | r:=sqrt(1+z); |
| > | with(plots): |
Warning, the name changecoords has been redefined
| > | cylinderplot(r, theta=0..2*Pi, z=-1..1); |
To graph in spherical coordinates. e.g. rho = sin^2(phi), we use the standard formulas x=rho*sin(phi)*cos(theta), y=rho*sin(phi)*sin(theta), z=rho*cos(phi) and write the equation parametrically.
| > | rho:=sin(phi)^2; |
| > | plot3d([rho*sin(phi)*cos(theta), rho*sin(phi)*sin(theta), rho*cos(phi)], phi=0..Pi, theta=0..2*Pi); |