3

I have read in several sources, such as this Math Stack Exchange answer and these slides from a computer animation class (p. 44), that given two quaternions $\mathbf{q}_1, \mathbf{q}_2 \in \mathbb{R}^4$, the angle between the 4D quaternion vectors is equal to half the angle between their corresponding 3D orientations. In other words, letting $\mathbf{R}_1, \mathbf{R}_2 \in SO(3)$ denote the rotation matrices corresponding to $\mathbf{q}_1$ and $\mathbf{q}_2$ respectively, the angle between $\mathbf{q}_1$ and $\mathbf{q}_2$ is half the angle of rotation required to get from $\mathbf{R}_1$ to $\mathbf{R}_2$ (the "geodesic distance"). Note that due to the fact that the maximum angle between any 3D orientations is $\pi$, I believe this fact only holds when the angle between the 4D quaternion vectors is less than or equal to $\pi/2$.

I have done an exhaustive search and can't find any proof of why this is true. So I'm looking for proof.


my best insight/attempt:

So far, I have only been able to prove this fact for the case in which $\mathbf{q}_2$ equals the identity quaternion. Start by writing out the quaternions vectors in terms of axis-angles, where $\theta_1$ and $\mathbf{e}_1 \in \mathbb{R}^3$ denote the angle and axis of $\mathbf{q}_1$, and $\theta_2$ and $\mathbf{e}_2 \in \mathbb{R}^3$ denote the angle and axis of $\mathbf{q}_2$. We have $$ \mathbf{q}_1 = \begin{bmatrix} \cos(\theta_1/2) \\ \sin(\theta_1/2) \mathbf{e}_1 \end{bmatrix}, ~~~ \mathbf{q}_2 = \begin{bmatrix} \cos(\theta_2/2) \\ \sin(\theta_2/2) \mathbf{e}_2 \end{bmatrix} . $$ Taking the dot product and using that fact that the quaternions are unit length, we can solve for the angle $\phi$ between the 4D quaternion vectors: $$ \begin{align} \cos \phi &= \frac{\mathbf{q}_1 \cdot \mathbf{q}_2}{\lVert \mathbf{q}_1 \rVert \lVert \mathbf{q}_2 \rVert} \\ &= \cos(\theta_1/2) \cos(\theta_2/2) + \mathbf{e}_1 \cdot \mathbf{e}_2 \sin(\theta_1/2) \sin(\theta_2/2) . \end{align} $$ If $\mathbf{q}_2$ is taken as the identity quaternion, we have $\theta_2 = 0$ and $\mathbf{q}_2 = [1 ~~ 0 ~~ 0 ~~ 0]^T$, and the equation above becomes $$ \begin{align} \cos \phi &= \cos(\theta_1/2) . \end{align} $$ Since we have defined $\phi$ to be non-negative, for $-\pi \leq \theta_1 \leq \pi$ we have $\phi = | \theta_1/2 |$. So this seems to offer some insight, but I'm not sure where to go from here.

Trevor
  • 233
  • Sorry, late to the party. Note that q and -q correspond to the same 3D orientation. It helps to think of an orientation-quaternion as a double arrow pointing in opposite directions. So if you wanted to know the angle between the orientations that correspond to q1 and q2, you would first check if -q2 is closer to q1 than q2 is, and if so, work with -q2. So, the furthest q1 and + or - q2 can be apart is 90°, corresponding to a 180° apartness for the 3D orientations. – mqnc Apr 08 '24 at 12:26

1 Answers1

1

I assume by "angle of rotation required to get from $R_1$ to $R_2$" you mean simply the by angle which $R_2{R_1}^{-1}$ rotates around its axis. But this is the same as the angle to rotate the identity frame to $R_2{R_1}^{-1}$, because both transitions between frames are achieved by the same rotation, $R_2{R_1}^{-1}$!

And similarly, the angle between quaternions $q_1$ and $q_2$ is the same as the angle between $1$ and $q_2{q_1}^{-1}$, because multiplying by a unit quaternion is a 4D isometry. But then, the quaternion $q_2{q_1}^{-1}$ corresponds to the rotation $R_2{R_1}^{-1}$... so if you say

I have only been able to prove this fact for the case in which $q_2$ equals the identity

then you're already done.

anon
  • 155,259
  • I was thinking something along those lines. So I understand that applying a rotation to two quaternions $\mathbf{q}_1$ and $\mathbf{q}_2$ in 4D will not change the angle between them. But in applying that rotation, why can you say that the angle between their corresponding orientations $\mathbf{R}_1$ and $\mathbf{R}_2$ won't change? – Trevor Mar 08 '21 at 22:43
  • @Trevor The premise here is that the "angle" between the orientations $R_1$ and $R_2$ is $R_2R_1^{-1}$. Do you have a different definition in mind? If you accept that definition, then by definition the angle between $R_1$ and $R_2$ is the same as the angle between the identity rotation and $R_2R_1^{-1}$. – David K Mar 09 '21 at 12:23
  • @DavidK Thanks, that is the definition of angle I intended. I think it makes more sense now. So to reiterate, before $\mathbf{q}_1$ and $\mathbf{q}_2$ are rotated, they had a net orientation of $\mathbf{R}_2 \mathbf{R}_1^{-1}$. After rotating the quaternions, they still have a net orientation of $\mathbf{R}_2 \mathbf{R}_1^{-1}$, which proves that the angle between orientations does not change when rotating the quaternions. – Trevor Mar 10 '21 at 01:15