Cylindrical Coordinates

Manipulate[Show[Graphics3D[{GrayLevel[.3],PointSize[.02],Point[{0,0,0}],RGBColor[.5,0,0],PointSize[.02],Point[{r Cos[theta],r Sin[theta],z}],

{Thickness[Small],RGBColor[.5,.7,1],
top={r Cos[theta],r Sin[theta],z};
Line[1.1Sqrt[9+r^2]{- Normalize[top],Normalize[top]}],
Line[{{r Cos[theta],r Sin[theta],-3.6},{r Cos[theta],r Sin[theta],3.6}}]},

If[ax,{Gray,Line[{{-5,0,0},{5,0,0}}],Line[{{0,-5,0},{0,5,0}}],Line[{{0,0,-5},{0,0,5}}],
Line[{{0,0,-5},{0,0,5}}]},{}],Yellow,Opacity[.5],Cylinder[{{0,0,-3},{0,0,3}},r]}],ParametricPlot3D[{r Cos[t],r Sin[t],z},{t,0,2 Pi}],PlotLabel->Column[{Row[{"(r, θ, z) = ("<>ToString[NumberForm[r,{3,2},NumberPadding->{"","0"}]]<>", "<>ToString[NumberForm[theta/Pi,{2,1},NumberPadding->{"","0"},ExponentFunction->(Null&)]]<>" π, "<>ToString[NumberForm[z,{2,1},NumberPadding->{"","0"}]]<>")"}],Row[{"(x, y, z) = ("<>ToString[NumberForm[r Cos[theta],{3,2},NumberPadding->{"","0"}]]<>", "<>ToString[NumberForm[r Sin[theta],{2,1},NumberPadding->{"","0"},ExponentFunction->(Null&)]]<>", "<>ToString[NumberForm[z,{2,1},NumberPadding->{"","0"}]]<>")"}]},Center],PlotRange->4/3{{-3,3},{-3,3},{-3,3}},ViewAngle->Pi/10,ImageSize->{500,400},Boxed->False,SphericalRegion->True],{{r,2.,"r"},.5,2.},{{theta,0,"θ"},0,2. Pi},{{z,2,"z"},-2.5,2.5},{{ax,False,"show axes"},{True,False}}, TrackedSymbols:>{r,theta,z,ax}]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Cylindrical Coordinates" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/CylindricalCoordinates/

Contributed by: Jeff Bryant

A full-function Wolfram Mathematica 6 system is required to edit this notebook.
GET WOLFRAM MATHEMATICA 6 »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »