# Plotting x-axis rotation of a cycloid arch of radius 1

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.

\begin{tikzpicture}
\begin{axis}[
title=Revolution of one arch of cycloid,
colormap/cool,
]
mesh,
samples=50,
domain=-8:8,
]
{-cos^3(t)+3cos^2(t)-3cos(t)+1};
\addlegendentry{$\pi \int_{0}^{2\pi} -cos^3(t)+3cos^2(t)-3cos(t)+1 dt$}
\end{axis}
\end{tikzpicture}


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

• You could use something like \addplot3 ({calculate x},{calculate y},{calculate z}) with three formulas representing how to get x,y,z. May 3, 2017 at 5:15
• May 3, 2017 at 5:16
• @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

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

\documentclass[border=9,tikz]{standalone}
\usetikzlibrary{3d}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}

\begin{document}

\begin{tikzpicture}[cap=round,join=round]
\begin{axis}[axis equal,colormap/cool] 