| Topic: Multiplication of matrices
|
|
 | Multiplication of matrices | |  |
| Poster | : franek | | Posts | : 3 | | Country | : France | | City | : Paris |
| | | | Posted by franek on 10/04/2009 at 02:06:32
| | Hello
First of all, thanks for your great tutorials. As i'm beginning to develop applications with the xna framework, they simply are fantastic help.
About your third property for matrix multiplication, you are talking about doing a translation and then a rotation.
so we have
coord_trans = matrice_trans * coord_world
and then
coord_trans+rot = matrice_rot * coord_trans
so, as we are following the right to left convention for matrice concatenation we have
coord_trans+rot = matrice_rot * matrice_trans * coord_world
So the resulting transformation matrix is
matrice_rot * matrice_trans
and not
matrice_trans * matrice_rot
as you are saying at the end of the tutorial, right ?
i think your analogy you're making in your tutorial about 2D games in XNA is really good as you are saying that '*' means after.
So if we're talking about "a translation followed by a rotation" the resulting matrix is
m_transformation = m_rot * m_trans
but if we're talking about getting "the rotated and translated coordinates" we have
m_transformation = m_trans * m_rot
Or otherwise, i'm really missing something there. What do you think ?
Regards
| |
|
| | | | | | Poster | : riemer | | Posts | : 1388 | | Country | : Belgium | | City | : Antwerp |
| | | | Posted by riemer on 14/04/2009 at 13:50:04
| | your post is entirely correct, but I'm not following you here:
but if we're talking about getting "the rotated and translated coordinates" we have
m_transformation = m_trans * m_rot
since the AND doesn't specify which operation is first, m_transformation can both be m_trans*m_rot or m_rot*m_trans.
If this is a certain part in the text, can you refer to it so I can find which part is troubling you?
| |
|
| | | | | | Poster | : franek | | Posts | : 3 | | Country | : France | | City | : Paris |
| | | | Posted by franek on 15/04/2009 at 09:54:02
| | Hello Riemer
Yes, i was refering to your text, when you are saying :
"Now you only need to multiply your points with this matrix M3 to get the rotated and translated coordinates of your points!"
I supposed here that you were talking firstly about a rotation and then a translation of a 3D object. So, in this case, we have :
m_transformation = m_trans * m_rot
That was the part that little troubled me, but that is not a big problem.
Am i clear enough ?
Nevertheless, thank you for your answer. Go on with your great work, it's my main reference.
Regards | |
|
|
 | | |  |
|
|
|
If you appreciate the amount of time I spend creating and updating these pages, feel free to donate -- any amount is welcome !
|
- Website design & DirectX code : Riemer Grootjans - ©2006 Riemer Grootjans
|
|