3
$\begingroup$

Given three points on a unit sphere, their coordinates are $p_1 = [\phi_1, \theta_1]$, $p_2 = [\phi_2, \theta_2]$, and $p_3 = [\phi_3, \theta_3]$, where $\phi$ and $\theta$ are azimuthal angle and polar angle, respectively.

Rotate about the sphere center so that $p_1$ locates at $[0, 0]$ and $p_2$ at $[0, l]$ (obviously, $l$ equals to the great-arc distance between $p_1$ and $p_2$).

On the rotated sphere, what is the new coordinates $[\phi, \theta]$ for $p_3$?

$\endgroup$
1
  • $\begingroup$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. $\endgroup$
    – Community Bot
    Nov 23, 2021 at 22:38

1 Answer 1

3
$\begingroup$

Here is a brute force method to find the new coordinates of $p_3$.

Assuming that $\phi$ is the azimuthal angle measured counter clockwise from the positive $x$ axis, and $\theta$ is the polar angle measured from the positive $z$ axis, we can first convert the spherical coordinates into rectangular coordinates as follows:

$ p_1 = \begin{bmatrix} \sin \theta_1 \cos \phi_1 \\ \sin \theta_1 \sin \phi_1 \\ \cos \theta_1 \end{bmatrix} \hspace{40pt} p_2 = \begin{bmatrix} \sin \theta_2 \cos \phi_2 \\ \sin \theta_2 \sin \phi_2 \\ \cos \theta_2 \end{bmatrix} \hspace{40pt}p_3 = \begin{bmatrix} \sin \theta_3 \cos \phi_3 \\ \sin \theta_3 \sin \phi_3 \\ \cos \theta_3 \end{bmatrix} $

In addition, let vectors $q_1 $ and $q_2$ be defined as follows:

$q_1 = \begin{bmatrix} 0\\ 0 \\ 1\end{bmatrix} \hspace{40pt} q_2 = \begin{bmatrix} \sin \psi \\ 0\\ \cos \psi \end{bmatrix} $

where the angle $\psi = \cos^{-1} \left(p_1 \cdot p_2\right) $

Now consider the rotation that takes $p_1$ and sends it to $q_1$ and takes $p_2$ and sends it to $q_2$, this can expressed as

$q_1 = R p_1, \hspace{40pt} q_2 = R p_2 $

We need a third vector, so we'll take the cross product and write

$q_1 \times q_2 = R ( p_1 \times p_2 ) $

Hence, we now have the matrix equation,

$ \begin{bmatrix} q_1 , q_2 , q_1 \times q_2 \end{bmatrix} = R \begin{bmatrix} p_1 , p_2 , p_1 \times p_2 \end{bmatrix} $

which is of the form

$ Q = R P $

From which it follows that

$R = Q P^{-1} $

Finally, apply this rotation to $p_3$ to obtain $q_3$

$q_3 = R p_3 = \begin{bmatrix} \sin \theta \cos \phi \\ \sin \theta \sin \theta \\ \cos \theta \end{bmatrix} $

The new angles $\theta$ and $\phi$ can be found from the coordinates of $q_3$ as follows

$ \theta = \cos^{-1} q_{3z} $

$ \phi = \text{ATAN2} ( q_{3x} , q_{3y} ) $

$\endgroup$
4
  • $\begingroup$ Thanks. I've edited the solution to clarify the angles. $\endgroup$ Nov 25, 2021 at 14:18
  • $\begingroup$ @DavidK I've re-edited the solution to use the standard convention of angles. $\endgroup$ Nov 26, 2021 at 11:48
  • $\begingroup$ Yes, you're right. I'll change that shortly. $\endgroup$ Nov 26, 2021 at 14:21
  • $\begingroup$ Already upvoted. I think this matches the question exactly now. $\endgroup$
    – David K
    Nov 26, 2021 at 14:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .