I need help figuring out how to plot in cylindrical coordinates. I read that CylindricalPlot3D was replaced with RevolutionPlot3D. Here is my function:

Integrate[ r^3*(Cos[ θ])^2, { θ, 0, 2 π}, {r, 0, 1}, {z, 0, 2 r}]
(2 π)/5

when I try RevolutionPlot3D I get:

RevolutionPlot3D[ r^3*(Cos[θ])^2, { θ, 0, 2 π}, {r, 0, 1}, {z, 0, 2 r}]
RevolutionPlot3D::nonopt: Options expected (instead of {z,0,2 r}) beyond position 3 
in RevolutionPlot3D[r^3 Cos[θ]^2,{ θ,0,2 π},{r,0,1},{z,0,2 r}]. 
An option must be a rule or a list of rules. >>
  • $\begingroup$ @Kuba I wonder if people take the time to reformat code would it be too much extra to replace i -> I? Sorry for nitpicking, but you inter-edited my edit which I discarded :) Also \[Theta] to θ. $\endgroup$ – István Zachar Dec 6 '13 at 7:56
  • $\begingroup$ i'm sorry i don't know what code reformat i was supposed to use. i'm trying to plot this triple integral volume. $\endgroup$ – user10977 Dec 6 '13 at 7:59
  • $\begingroup$ @IstvánZachar you are right, I was not paying attention. About greek letters, I replace them only when I'm on pc with the addon for it, now I'm not :) $\endgroup$ – Kuba Dec 6 '13 at 8:00
  • 1
    $\begingroup$ @user10977, what are you trying to visualise, the function r^3 Cos[θ]^2 or the volume over which you have integrated it? $\endgroup$ – Simon Woods Dec 6 '13 at 9:40
  • 1
    $\begingroup$ Your syntax is not valid for CylindricalPlot3D either. Do you have existing code you are trying to run? If not, why the reference to CylindricalPlot3D? $\endgroup$ – Mr.Wizard Dec 6 '13 at 17:33

RevolutionPlot3D accepts only a maximum of two variables for iteration in the form RevolutionPlot3D[f, {t, ...}, {θ, ...}]. Nevertheless, one can manipulate the third:

Manipulate[RevolutionPlot3D[r^3*(Cos[θ])^2, {θ, 0, 2 π}, {z, 0, 2 r}, 
  AxesLabel -> {"X", "Y", "Z"}, SphericalRegion -> True, Mesh -> False, 
  PlotRange -> {{-7, 7}, {-7, 7}, {-2, 2}}, BoxRatios -> {1, 1, .5}],
 {{r, π/2}, 0.001, π}]

Mathematica graphics

| improve this answer | |
  • $\begingroup$ thank you very much for the response but that's not what it is supposed to look like. it needs to be the solid volume solid that lies within the cylinder x^2+y^2=1, above the plain z=0 ,and below the cone z^2=4x^2+4y^2. i converted to cylindrical coordinates (z,r,theta) $\endgroup$ – user10977 Dec 6 '13 at 8:51
  • $\begingroup$ @user10977 So you want this RegionPlot3D[x^2 + y^2 < 1 && z^2 < 4 x^2 + 4 y^2, {x, -1, 1}, {y, -1, 1}, {z, 0, 2}, PlotPoints -> 40, MaxRecursion -> 3, PlotRange -> All, Mesh -> None, PlotStyle -> Opacity@.3] but done with RevolutionPlot3D? $\endgroup$ – István Zachar Dec 6 '13 at 12:30
  • $\begingroup$ Yes yes thank you that is exactly the shape i need you are the best. It does not need to be with RevolutionPlot3D. I should have explained myself more clearly. I'm looking to create a graph with that solid/volume that i can manipulate the variables just like this example: demonstrations.wolfram.com/data/001571/0007/… $\endgroup$ – user10977 Dec 7 '13 at 0:25
  • $\begingroup$ here is the page it comes from demonstrations.wolfram.com/ExploringCylindricalCoordinates $\endgroup$ – user10977 Dec 7 '13 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.