Forum
Contact





DirectX using C#
DirectX using C++
DirectX using Visual Basic



Latest Forum posts

 Suggestion to change a few lines
  Posted by: Insomnica
  When: 06/09/2010 at 14:37:05

 Collision with series 1
  Posted by: radulph
  When: 05/09/2010 at 13:33:14

 HLSL calculating normals
  Posted by: miroslavign
  When: 04/09/2010 at 17:26:26

 Collision with series 1
  Posted by: ToastbrotX
  When: 04/09/2010 at 16:52:02

 HLSL calculating normals
  Posted by: Rich_Zap
  When: 04/09/2010 at 15:00:20

 Collision with series 1
  Posted by: ToastbrotX
  When: 04/09/2010 at 12:28:41

 HLSL calculating normals
  Posted by: miroslavign
  When: 04/09/2010 at 08:46:31

 Walk along a wall
  Posted by: Anonymous
  When: 03/09/2010 at 10:28:02

 model problems
  Posted by: muffinman
  When: 03/09/2010 at 06:47:32

 Vertices problem
  Posted by: Anonymous
  When: 03/09/2010 at 05:48:35

 OcTree Question
  Posted by: Zorzomezz
  When: 03/09/2010 at 04:07:03

 error x3000:syntax error
  Posted by: Anonymous
  When: 02/09/2010 at 06:55:17

 Reflection problem in corners ...
  Posted by: Anonymous
  When: 31/08/2010 at 20:53:30

 OcTree Question
  Posted by: radulph
  When: 31/08/2010 at 18:00:04

 model problems
  Posted by: Archenon
  When: 30/08/2010 at 05:54:27

 Changing computer breaks my game
  Posted by: Archenon
  When: 30/08/2010 at 05:49:50

 model problems
  Posted by: muffinman
  When: 28/08/2010 at 16:58:10

 Vertices problem
  Posted by: Anonymous
  When: 27/08/2010 at 15:35:36

 Changing computer breaks my game
  Posted by: radulph
  When: 27/08/2010 at 07:12:24

 effects file and XNA 4.0 (Beta)
  Posted by: radulph
  When: 26/08/2010 at 06:33:33




Topic: Multiplication of matrices



  
Goto parent category
  
Create a new user account


   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

  
Post a new reply
 





Google
 
Web www.riemers.net
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


News
Home
Forum
XNA 2.0 Recipes Book (8)
XNA 3.0 Recipes Book (8)
Downloads
Extra Reading (3)
Matrices: geometrical
Matrix Mathematics
Homogenous matrices
Community Projects (1)
Tutorials (160)
XNA 3.0 using C# (89)
DirectX using C# (54)
Series 1:Terrain (14)
Opening a window
Linking to the Device
Drawing a triangle
Camera
Rotation - Translation
Indices
Terrain creation
Terrain from file
DirectInput
Importing bmp files
Colored vertices
DirectX Light basics
Mesh creation
Mesh lighting
Series 2: Flightsim (19)
Series 3: HLSL (19)
Short Tuts (2)
Resizing problem
Checking Device caps
DirectX using C++ (15)
DirectX using VB (2)