9
$\begingroup$

Please note that I am not referring to Euler angles of the form (α,β,γ). I am referring to the axis-angle representation, in which a unit vector indicates the direction axis of a rotation and a scalar the magnitude of the rotation.

Let $(\hat{n_1},\theta_1)$ refer to the first rotation and $(\hat{n_2},\theta_2)$ refer to the second rotation. What is the value of the first rotation followed by the second rotation, in axis-angle representation?

I understand that the composition of two rotations represented by quaternions $q_1$ and $q_2$ is equal to their product $q_2q_1$. Is there a way to find the composition of axis-angle rotations (without having to convert them to quaternions, multiply them, and convert them back to axis-angle) in a similar manner? Is there a simplified formula for this operation?

$\endgroup$
8
$\begingroup$

The formula is given in this excerpt from a journal paper. It was discovered by the French mathematician Olinde Rodrigues in 1840, which was before the invention of vectors or even quaternions (which were invented before vectors).

The composition of $\alpha\hat{l}$ and $\beta\hat{m}$ (where the second rotation is applied and then the first is applied) is given by $\gamma\hat{n}$, where $\cos\frac{\gamma}{2} = \cos\frac{\alpha}{2}\cos\frac{\beta}{2} - \sin\frac{\alpha}{2}\sin\frac{\beta}{2}\hat{l}\cdot\hat{m}$ and $\sin\frac{\gamma}{2}\hat{n}=\sin\frac{\alpha}{2}\cos\frac{\beta}{2}\hat{l}+\cos\frac{\alpha}{2}\sin\frac{\beta}{2}\hat{m}+\sin\frac{\alpha}{2}\sin\frac{\beta}{2}\hat{l}\times\hat{m}$.

As a sanity check, it's easy to see that when $\hat{l}=\hat{m}$, then it's easy to see that $\gamma=\alpha+\beta$ and $\hat{n}= \hat{l}=\hat{m}$.

In any case, these formulas are proven in detail in this chapter of Simon Altman's book "Rotations, Quaternions, and Double Groups", but it basically boils down to this spherical triangle:

enter image description here

See also this related result proven by William Rowan Hamilton after he invented quaternions.

$\endgroup$
  • $\begingroup$ Yep, that is about as monstrous as I expected. $\endgroup$ – rschwieb Oct 22 '16 at 1:59
  • $\begingroup$ @rschwieb Haha, at least there's some logic to it in terms of geometry, rather than just a random equation that comes out of nowhere. $\endgroup$ – Keshav Srinivasan Oct 22 '16 at 2:19
  • $\begingroup$ @KeshavSrinivasan Can you disclose the title and author of that mysterious journal paper? $\endgroup$ – BarbaraKwarc Nov 6 '16 at 14:30
  • 1
    $\begingroup$ @BarbaraKwarc Sure, it's "Hamilton, Rodrigues, and the Quaternion Scandal" by Simon L. Altmann: jstor.org/stable/2689481 $\endgroup$ – Keshav Srinivasan Nov 6 '16 at 14:52
  • $\begingroup$ Thanks, I'm reading it right now. What is the "binary rotation" he is mentioning all the time? $\endgroup$ – BarbaraKwarc Nov 6 '16 at 21:21
2
$\begingroup$

I do not believe there is without passing through some alternate representation (quaternion, matrix, ...). This is one of the known disadvantages of axis-angle compared to the others, while an advantage is the triviality of inversion (simply negate the angle or the axis).

$\endgroup$
  • $\begingroup$ There is such a formula, and it was discovered in 1840; see my answer. $\endgroup$ – Keshav Srinivasan Oct 21 '16 at 3:38
1
$\begingroup$

The quaternion procedure is probably the simplest, easiest to implement, and most computationally economical way to go.

In practice you would likely be doing all of this in a computer anyhow, and computing the product of two quaternions (in the big scheme of things) is not much harder than two real numbers, or two complex numbers. I think the multiplication is more computatationally efficient than multiplying two $3\times 3$ matrices, at least.

Actually, if you sit down and work the quaternion solution, you can probably work out a formula completely in terms of the coordinates of the $n_i$ and the angles $\theta_i$. It would be monstrous, but it would be totally in terms of your data (and maybe inverse trigonometric functions.)

$\endgroup$
  • $\begingroup$ It's not as monstrous as you might think, and it actually makes some geometric sense; see my answer. $\endgroup$ – Keshav Srinivasan Oct 21 '16 at 3:37
1
$\begingroup$

I did some original research using Mathematica, and this was the simplest form I could find.

Given two axis angles A and B, with a=||A|| and b=||B||

The resulting vector has the length

c=acos(cos(a)cos(b)-A.B/(a b)sin(a)sin(b))

and is in the direction

E=A b cos(b)sin(a)+a B cos(a)sin(b)+A x B sin(a)sin(b)

So

C=c*E/||E||

Not very monstrous, but it took several hours of simplifying and prodding.

$\endgroup$
  • 1
    $\begingroup$ Use MathJax please. It's hard to read. $\endgroup$ – SchrodingersCat Nov 14 '15 at 12:08
  • $\begingroup$ Schrodinger's cat is right $\endgroup$ – Trey Reynolds Jun 28 '18 at 19:26
0
$\begingroup$

Look at the following link: Axis–angle representation

$\endgroup$
  • $\begingroup$ Sorry I didn't check the link in the post, but I did in Wikipedia. If you read the details there is a formula on how to rotate a vector give the axis-angle, you compose it twice and get the desired formula. $\endgroup$ – Heberto del Rio May 6 '13 at 11:04
  • $\begingroup$ Well I should delete my comment, but it just seemed odd it was the same link. Also I think he wants to start with one axis-angle rotation, rotate in space to get result, rotate that result by the second angle-axis rotation, and finally put the overall map back into the form of an angle-axis rotation, so a kind of "inverse" at the end, going from the result of the two maps back into angle-axis form. I'd guess the final result wouldn't be simple only in terms of the two angle-axis rotations composed. $\endgroup$ – coffeemath May 6 '13 at 17:14
  • $\begingroup$ That is correct. What would be the explicit axis-angle representation of two axis-angle rotations combined, without having to apply the first rotation to a vector and then the second, using Rodrigues' rotation formula? $\endgroup$ – user76284 May 6 '13 at 18:19
  • $\begingroup$ @coffeemath The final result is simpler than you might assume, and it makes some geometric sense; see my answer. $\endgroup$ – Keshav Srinivasan Oct 21 '16 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.