\begin{align*}
x_1   &= r \cos \phi_1,\\
x_2   &= r \sin \phi_1 \cos \phi_2,\\
x_3   &= r \sin \phi_1 \sin \phi_2 \cos \phi_3,\\
\ldots\\
x_{n-1} &= r \sin \phi_1 ... \sin \phi_{n-2} \cos \phi_{n-1},\\
x_n   &= r \sin \phi_1 ... \sin \phi_{n-2} \sin \phi_{n-1}.
\end{align*}
