Coordinate conversions
$$\begin{array}{lcl}
(\rho,\theta,\phi)\to (x,y,z) & \qquad & (x,y,z) \to (\rho,\theta,\phi)
\\\\x = \rho \sin \phi \cos \theta & & {\rho}^2 = x^2+y^2 + z^2
\\y = \rho \sin \phi \sin \theta & & \displaystyle \tan\theta = \frac{y}{x} \qquad \theta\in[0,2\pi]
\\z = \rho \cos \phi & & \displaystyle\phi= \arccos \left(\frac{z}{\sqrt{x^2+y^2+z^2}}\right)
\end{array}
$$