4

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

Blaz Bratanic
  • 2,279
  • 12
  • 17

1 Answers1

4

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

beaker
  • 16,331
  • 3
  • 32
  • 49
  • Might be, that my question is unclear. I have rotation angles for constructing initial transformation matrix. What i need, however, is to find another set of rotation angles that will create inverse transformation matrix doing the rotations in the same order. Basically Rz * Ry * Rx = (Rz' * Ry' * Rx')^-1 – Blaz Bratanic Apr 09 '14 at 18:54
  • If I understand you, then you just need the first line of my answer with R = (Rz * Ry * Rx). – beaker Apr 09 '14 at 19:37
  • Okay, this obviously didn't convince you. Please post examples of your rotation matrices, the code to generate them, and what you hope to achieve. – beaker Apr 10 '14 at 18:10