I want to make a RevolutionPlot3D of a three dimensional wave-function which is defined only between two radius. I work in cylindrical coordinates. The idea is to get a plot of the whole region for a given height in the cylinder.

RevolutionPlot3D[ψ3DNorm[1, r, ϕ, 2], {r, 1, 2}, {ϕ, 0, 2 Pi}, PlotRange -> All]

enter image description here

I want to be able to keep a track of the angle on the plot by having an axis giving the angle around the plot or at least, a axis stating the angle 0. How can I do that?

  • $\begingroup$ You could try Show[ RevolutionPlot3D[ Cos[4t], {r, 1, 2}, {t, 0, 2 \[Pi]} , AxesOrigin -> {0, 0, 0} , Boxed -> False ] , Graphics3D[{ Thick, Red, Arrow[{{0, 0, 0}, {0, 2, 0}}] }] ]. You can obviously add more complex graphics this way as well. $\endgroup$
    – N.J.Evans
    Commented Jun 6, 2016 at 15:31
  • $\begingroup$ Thank you but with that solution, you don't have a clue about the direction of rotation in which the angle is plotted by the function? $\endgroup$
    – Ezareth
    Commented Jun 6, 2016 at 18:43
  • $\begingroup$ Why not use something like Hue[] to color your surface according to the angle of interest instead? $\endgroup$ Commented Jun 7, 2016 at 17:05

1 Answer 1


Perhaps you could color-code some custom mesh lines to indicate the angular values at that position:

plot = RevolutionPlot3D[
   Cos[4 t], {r, 1, 2}, {t, 0, 2 Pi},
   Mesh -> {{
            {1*^-6, Directive[Black, Thick]}, 
            {Pi/2, Directive[Red, Thick]}, 
            {Pi, Directive[Darker@Green, Thick]}, 
            {3/2 Pi, Directive[Blue, Thick]}}
   MeshFunctions -> {Function[{x, y, z, t, theta, r}, theta]},
   ImageSize -> Large

Mathematica graphics

The black line corresponds to $\theta = 0$, the red line to $\theta = \pi/2$, and so on.

(Note that I had to shift the first mesh line slightly away from $0$ because otherwise it would have been overshadowed by a thing gray line at that position, whose origin is unclear to me.)

  • $\begingroup$ I would guess that the gray line you got came from BoundaryStyle. Try setting it to None. $\endgroup$ Commented Jun 7, 2016 at 17:04
  • $\begingroup$ @J.M. I should have been more clear. I had in fact tried to set BoundaryStyle -> None, which indeed removes the grey "mesh line" at $0$ as well as the boundary line, but even then no custom mesh line is shown at the $0$ position: code&result. I have also tried machine-precision 0. instead, with no luck. I'll dig into older questions later today; perhaps this is a known issue? $\endgroup$
    – MarcoB
    Commented Jun 7, 2016 at 17:09
  • $\begingroup$ Hmm, I think that would be due to roundoff error, so that the $\theta$ mesh doesn't actually start at $0$. I believe this problem has indeed been encountered before here, but I can't find relevant threads at the moment. $\endgroup$ Commented Jun 7, 2016 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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