0
votes

I have a transformation matrix constructed as H = Rz * Ry * Rx. So rotations are performed in xyz order.

Now, given rotation angles around x, y, and z axes, is there a way to find rotation angles to perform inverse operation, such that

v = Rz * Ry * Rx * v0

v0 = Rz' * Ry' * Rx' * v

Just for completion sake. In the end I extracted the Euler angles from transformation matrix as described in:

Computing Euler angles from a rotation matrix - Gregory G. Slabaugh

1

1 Answers

2
votes

If your matrices are purely rotation (i.e. no translation), the inverse is simply the transpose:

R-1 = RT

If your transformation includes translation like so:

A = 
| R  T |  
| 0  1 |

Then use the transpose of the rotation matrix as above and for the translation portion, use:

T-1 = -RTT

Then

A-1 =
| R-1 T-1 |
| 0    1    |

Also note that you will have to do the inverse rotations in the inverse order:

v0 = Rx-1 * Ry-1 * Rz-1 * v