Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am trying to understand matrix to Euler angles conversion. So I read Graphics Gems IV, page 222 from Ken Shoemake. It states:

"Suppose we have code to convert a rotation matrix to XEDS angles, $R = R_z(c)R_y(b)R_x(a)$. If we are asked to extract XEDR, $R = R_z(a)R_y(b)R_x(c)$, we use our code as is, and swap $a$ and $c$ afterwards." Restated (am I wrong??), it means that a $XYZ$ rotation of $(a, b, c)$ around static axes, is equivalent to a $XYZ$ rotation of $(c, b, a)$ around moving axes. This is exactly what they are doing in the source code.

In wikipedia, they state instead: "For either Euler or Tait-Bryan angles, it is very simple to convert from an intrinsic (rotating axes) to an extrinsic (static axes) convention, and vice-versa: just swap the order of the operations. An $(a, b, c)$ rotation using $X-Y-Z$ intrinsic convention is equivalent to a $(c, b, a)$ rotation using $Z-Y-X$ extrinsic convention; this is true for all Euler or Tait-Bryan axis combinations."

Restated (am I wrong 2 ? ), it means that a $XYZ$ rotation of $(a, b, c)$ around static axes, is equivalent to a $ZYX$ rotation of $(c, b, a)$ around moving axes which I can understand if I derive the sequence of rotation in static frames starting from the sequence of rotation in moving frames.

If I take a simple example,with no rotation around $Y $nor $Z, R = Rx(a)$ in static frames, Shoemake states that $R = R_z(a)$ in moving frames while wikipedia states that $R = Rx(a)$ in moving frames.

Moreover, taking it source code, and converting the same Euler angles with one rotation only and different rotation orders results in different quaternions. Intuitively, I believe that if we are rotating around one axis only, then order does not matter and it should always return the same quaternion.

PROBLEM:

Everybody is using Shoemake algo for a long time so it HAS to be right and I HAVE to be wrong. Someone could please help to see what I am doing wrong please?

Best regards.

share|improve this question
    
What are XEDS angles? –  Matt N. Jan 16 '12 at 13:25
    
@Matt: please see Graphics Gems IV, page 222 for an explanation. it is complicated enough that it would be useless for me to reproduce the text here. But I believe that my mistake is in a misunderstanding of the initial conventions... –  Korchkidu Jan 16 '12 at 14:11
1  
@Korchkidu : Welcome to Math.SE, I beg you to use "$" sign for writing up the mathematical equations. These latex guide may be of some use for you. Try to use the formal way of writing. Thanks a lot for reading. All the very best . –  Iyengar Jul 16 '12 at 17:51

1 Answer 1

up vote 2 down vote accepted

Actually Wikipedia is right. Of course you have to keep the axis-to-angle relation. If rotating with angle $\theta$ around the $z$-axis, you cannot suddenly use this angle to rotate around the $x$-axis. So it is true that an $XYZ$ moving-axis representation with angles $(\alpha,\beta,\gamma)$ (resulting in $R=R_x(\alpha)R_y(\beta)R_z(\gamma))$ is equivalent to a ZYX fixed-axis rotation with angles $(\gamma,\beta,\alpha)$ (again resulting in $R=R_x(\alpha)R_y(\beta)R_z(\gamma))$ and therefore the same rotation.

But I wouldn't think Shoemake to make such a dumb error and neither his code to be incorrect. But since I don't have any insight into this code or this book chapter, I would rather say that this paragraph is just poorly worded (like many statements about Euler angles suffer from notational inconsistencies).

Or you have just restated it incorrectly. Look at the quotation, no matter what transformations he means with XEDR and XEDS, his formulas still match his statements, since $R=R_z(\alpha)R_y(\beta)R_x(\gamma)$ is indeed the same as $R=R_z(\gamma)R_y(\beta)R_x(\alpha)$ with just $\alpha$ and $\gamma$ swapped. So with only seeing this quotation, he is perfectly right with his statements.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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