1

Suppose I want to perform translate in the following order:

  1. Scale by S
  2. Rotate by matrix R1
  3. Rotate by matrix R2
  4. Translate by T.

When I apply the matrix, should the overall transformation matrix be:

M = T x R1^-1 x R2^-1 x S

or

M = T x R2^-1 x R1^-1 x S

I always thought the transformations should be applied in reverse, so it should be the second case. But I'm told that it's the first case instead. Is there a special need to reverse the order of rotation apart from taking the inverse too?

Furthermore, why must I take the inverse matrix for rotation? Is there a particular formula for calculating the angle of rotation matrix as well?

oldselflearner1959
  • 633
  • 1
  • 5
  • 22
  • I'm voting to close this question as off-topic because it belongs on http://math.stackexchange.com/ – Alper t. Turker Jan 14 '18 at 12:07
  • all depends on the combination of coventions like: matrix layout (rowmajor/column major) , multiplication order (`matrix*vector` or `vector*matrix`) and if the matrices used are direct or inverse. So for some apps the order is direct and for other is reversed ... for more info see [Understanding 4x4 homogenous transform matrices](https://stackoverflow.com/a/28084380/2521214) – Spektre Jan 15 '18 at 12:00

0 Answers0