[Math] Rotating a point in spherical coordinates around Cartesian axis

coordinate systemsspherical coordinates

If I have a point in spherical coordinates, and I rotate it around one of the Cartesian axes, what will be the new spherical coordinates for the point? Both spherical and Cartesian coordinate systems have the same origin. Rotation axes go through origin as in the image below.

enter image description here

I'm building a mechanical device that has a camera rotating around object, and camera's relative coordinates should remain same while object rotates. I've read Wikipedia pages about transformation matrices etc, but those goes way over my head.

Best Answer

You can work with the rotation operators in $\mathbb{C}^2$. This method is well-known in quantum mechanics (rotation on the Bloch sphere).

I assume the following spherical coordinates system ($\theta$: colatitude, $\phi$: longitude): enter image description here

Given the coordinate angles $(\theta, \phi)$, define a vector $Q(\theta, \phi)$ in $\mathbb{C}^2$ by $$ Q(\theta, \phi) = \begin{pmatrix} \cos \frac{\theta}{2} \\ e^{i\phi}\sin\frac{\theta}{2}\end{pmatrix}. $$ Conversely, given a vector $\begin{pmatrix} z_1 \\ z_2 \end{pmatrix} \in \mathbb{C}^2$, define the coordinate angles $(\theta, \phi)$ by $$ Q^{-1}\begin{pmatrix} z_1 \\ z_2 \end{pmatrix} = \left( 2\, \textrm{atan} \frac{\textrm{Mod}(z_2)}{\textrm{Mod}(z_1)}, \textrm{Arg}(z_2)-\textrm{Arg}(z_1)\right). $$

Then the rotation to the angle $\alpha$ around a Cartesian axis maps the coordinate angles $(\theta,\phi)$ to the coordinate angles $$ (\theta', \phi') = (Q^{-1} \circ R_{\textrm{axis}}(\alpha) \circ Q)(\theta,\phi) $$ where the rotation operator $R_{\textrm{axis}}(\alpha)$ is, depending on the rotation axis: \begin{gather} R_x(\alpha) = \begin{pmatrix} \cos\frac{\alpha}{2} & -i\sin\frac{\alpha}{2} \\ -i\sin\frac{\alpha}{2} & \cos\frac{\alpha}{2} \end{pmatrix}, \\ R_y(\alpha) = \begin{pmatrix} \cos\frac{\alpha}{2} & -\sin\frac{\alpha}{2} \\ \sin\frac{\alpha}{2} & \cos\frac{\alpha}{2} \end{pmatrix}, \\ R_z(\alpha) = \begin{pmatrix} e^{-i\frac{\alpha}{2}} & 0 \\ 0 & e^{i\frac{\alpha}{2}} \end{pmatrix}. \end{gather}