I have to find components of a matrix for 3D transformation. I have a first system in which transfor

Cesar Mcguire

Cesar Mcguire

Answered question

2022-05-17

I have to find components of a matrix for 3D transformation. I have a first system in which transformations are made by multiplying:
M 1 = [ T r a n s l a t i o n ] × [ R o t a t i o n ] × [ S c a l e ]
I want to have the same transformations in an engine who compute like this:
M 2 = [ R o t a t i o n ] × [ T r a n s l a t i o n ] × [ S c a l e ]
So when I enter the same values there's a problem due to the inversion of translation and rotation.
How can I compute the values in the last matrix M 2 for having the same transformation?

Answer & Explanation

hi3c4a2nvrgzb

hi3c4a2nvrgzb

Beginner2022-05-18Added 15 answers

Assume you multiply matrices on the left, so that x is mapped to M 1 x and x is a column vector.
Let T R ( x ) = R x be a rotation, and let T T ( x ) = x + b be a translation. We have
T R ( T T ( x ) ) = R ( x + b ) = R x + R b T T ( T R ( x ) ) = T R x + b
If you want to have the second behave like the first, you have to "prerotate" the translation before applying it. That is, let T T ( x ) = x + R b We then have:
T T ( T R ( x ) ) = R x + R b
which matches the first output.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Linear algebra

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?