Table of Contents

Conversion Between Cartesian, Cylindrical and Spherical Coordinates

Coordinate System Notation
Cartesian $(x, y, z)$
Cylindrical $(\rho, \phi, z)$
Spherical $(r, \theta, \phi)$

Cartesian to Cylindrical

\begin{eqnarray*}
x &=& \rho * \cos(\phi) \\
y &=& \rho * \sin(\phi) \\
z &=& z
\end{eqnarray*}

Cylindrical to Cartesian

\begin{eqnarray*}
\rho &=& \sqrt(x^{2} + y^{2}) \\
\phi &=& \tan^{-1}{\frac{x}{y}} \\
z &=& z
\end{eqnarray*}

Cartesian to Spherical

\begin{eqnarray*}
x &=& r * \sin{\theta} * \cos{\phi} \\
y &=& r * \sin{\theta} * \sin{\phi} \\
z &=& r * \cos{\theta}
\end{eqnarray*}

Spherical to Cartesian

\begin{eqnarray*}
r &=& \sqrt{x^{2} + y^{2} + z^{2}} \\
\theta &=& \tan^{-1}{\frac{\sqrt{x^{2}+y^{2}}}{z} \\
\phi &=& \tan^{-1}{\frac{y}{x}}
\end{eqnarray*}

Rotation of a Point along an Arc

The task is to rotate a point $A(x, y)$ along an arc described by an angle $\alpha$. In order to do that, we express the point $A$ in polar coordinates:

\begin{eqnarray*}
x &\mapsto& r*\cos{\theta} \\
y &\mapsto& r*\sin{\theta}
\end{eqnarray*}

Then, rotating by angle $\alpha$ in the trigonometric sense (counter-clockwise) will change the angle $\theta$ and leave $r$ unchanged giving us the new point $B(u, v)$, where:

\begin{eqnarray*}
u &=& r*\cos{\theta + \alpha} \\
v &=& r*\sin{\theta + \alpha}
\end{eqnarray*}