I am trying to plot a rotation about the x-axis of this cycloid function to show the volume of the surface of revolution.

This is what the curve looks like. Ignore the purple cirlce.


The is the code I am using, I don't know how to get the sphere to show up.

            title=Revolution of one arch of cycloid,
\addlegendentry{$\pi \int_{0}^{2\pi} -cos^3(t)+3cos^2(t)-3cos(t)+1 dt$}

I know the formula should be $\int_{a}^{b} (y^2(t))*(x'(t))$ but I just get confused by the LaTeX syntax.

  • 1
    You could use something like \addplot3 ({calculate x},{calculate y},{calculate z}) with three formulas representing how to get x,y,z.
    – TeXnician
    May 3, 2017 at 5:15
  • @texenthusiast that question is somewhat related, but I need help with syntax on how to Rotate about x-axis. Output should be a sphere made out of mesh. May 3, 2017 at 5:34

1 Answer 1


Use the same technique that one transforms polar coordinate to cartesian coordinate.



    \begin{axis}[axis equal,colormap/cool]
        \addplot3[surf,samples=40,domain=0:360,y domain=0:360,z buffer=sort]


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .