0
$\begingroup$

I need to figure out how to turn two rotation groups, each rotating around Z, X then Y into a single rotation group, so that in one set of rotations I might obtain the same positions for a set of rotated points as after two consecutive sets of ZXY rotations.

So for a rotation group given by

$$ R_{zxy}(\psi, \varphi, \theta) = \begin{bmatrix} \cos \psi & -\sin \psi & 0 \\ \sin \psi & \cos \psi & 0\\ 0 & 0 & 1\\ \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \varphi & -\sin \varphi \\ 0 & \sin \varphi & \cos \varphi \\ \end{bmatrix} \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin \theta & 0 & \cos \theta \\ \end{bmatrix} $$

I need to find $\psi_3, \varphi_3, \theta_3$ from $\psi_1, \varphi_1, \theta_1$ and $\psi_2, \varphi_2, \theta_2$ so that for a point P

$$ P' = P R_{zxy}(\psi_3, \varphi_3, \theta_3) = P R_{zxy}(\psi_1, \varphi_1, \theta_1) R_{zxy}(\psi_2, \varphi_2, \theta_2) $$

$\endgroup$
2
  • $\begingroup$ What you mean is that you want to combine two rotations, not rotation groups, into one. A rotation group is an entire set of rotations with a particular structure. $\endgroup$
    – joriki
    Commented Jul 12, 2015 at 18:33
  • $\begingroup$ Oh I looked on Wikipedia and it seemed like that was what a SO(3) rotation group was. But yes I am talking about combining two 3D rotations. $\endgroup$ Commented Jul 13, 2015 at 9:03

1 Answer 1

1
$\begingroup$

Euler angles are not a good representation for multiplying rotations. In principle, it would be possible to write explicit formulas for the function you want, but the easier way to do this is to use the standard conversion between Euler angles and one of the other representations that are better at dealing with products, e.g. rotation matrices or unit quaternions. You can transform your two sets of Euler angles to one of those representations, do the multiplication there, and then transform back. If you really need a functional form, e.g. to take derivatives, you can view the whole process as chaining together three functions (transform, multiplication, inverse transform).

$\endgroup$
6
  • $\begingroup$ Thanks! I guess I shouldn't look for a simple straight symbolic solution then. If I multiply my 6 rotation matrices together then I get a simple 3x3 rotation matrix, and I can get my Euler angles from that by doing an atan2 for each angle like so, correct? $\endgroup$ Commented Jul 13, 2015 at 11:01
  • $\begingroup$ @MichelRouzic: No, if I'm not mistaken, that text uses a different Euler angle convention. (Compare their definition under "Composing a rotation matrix" with yours.) See Wikipedia for more on the annoying divergence of conventions for Euler angles (one of the reasons I avoid using them as much as I can). This section of that article gives the transform in the other direction for all twelve possible conventions; you can use it to find the right arctangents for your convention. $\endgroup$
    – joriki
    Commented Jul 13, 2015 at 11:09
  • $\begingroup$ Oh, do you have any pointers for how to find the arctangents? I'm looking at the ZYX matrix to compare it to the arctangents they found but I can't quite figure out how they get there sadly, so I don't know how to apply that to my ZXY convention. $\endgroup$ Commented Jul 13, 2015 at 11:25
  • $\begingroup$ @MichelRouzic: My advice would be: Figure out which of the conventions as distinguished by Wikipedia you're using -- that would likely be a useful thing to know independent of this particular problem. Then look up the rotation matrix corresponding to your product in the Wikipedia section I linked to above (second link in the previous comment), and do the same for the convention in the text you linked to; then comparing the two rotation matrices should hopefully suggest how to modify their arctangents to get yours. I don't have any other pointers, but I think there's a lot out there to google. $\endgroup$
    – joriki
    Commented Jul 13, 2015 at 11:30
  • $\begingroup$ That's what I did (like I said my convention is the ZXY one, or Z1X2Y3), my problem is that I don't know how I should compare the matrices. For instance cell r31 goes from -sinβ in ZYX to -cosβ*sinγ in ZXY, I don't know how that should affect the arctangents. For instance why, in ZYX, should θx = atan2(r32, r33)? $\endgroup$ Commented Jul 13, 2015 at 11:43

You must log in to answer this question.

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