I'm trying to plot a function of the form $z(r,\theta)$ where $r \in [0, R]$ for a finite R, $\theta \in [0,2\pi[$, and z is the third coordinate, a function of the first two. I couldn't find anything to do it natively, so I went back to Cartesian coordinates. But the result does not satisfy me, because the range of x is a function of y, a consequence of the constraint $ x^2+y^2 < R^2$. Is there already something in Mathematica to handle this kind of plot?
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
Do it parametrically. Here's a generic implementation:
For example,
|
|||
|
|

RevolutionPlot3Dwhen $z$ does vary with $\theta$? – whuber Feb 5 at 16:26RevolutionPlot[]for the purpose. Witness for instanceRevolutionPlot3D[r^2 Cos[3 t], {r, 0, 1}, {t, 0, 3 π/2}]. Of course, it's more enlightening to useParametricPlot3D[]instead, as in your answer. – 0x4A4D♦ Feb 7 at 3:12