Difference in rotation matrix

368 Views Asked by At

I have two objects A and B, with a start transformation matrices MA1 and MB1 (they include translation, rotation and scale). End matrix of the first object is MA2. How do I apply the same rotation as a rotation of object A from MA1 to MA2 ( difference) to object B and get MB2?

1

There are 1 best solutions below

1
On

First you extract rotation matrix from transformation matrix. You take top-left 3×3 submatrix $T$ and use polar decomposition to find rotation matrix $U$. If you know that scale is the same on all axes, then you can just divide $T$ by cubic root of determinant: $U=T/\sqrt[3]{\det T}$.

Finally, $U_{1\to2} = U_{A2} U_{A1}^{-1}$