#### Archived

This topic is now archived and is closed to further replies.

# inertia tensor Local to World coord

This topic is 5276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a question regarding moving the inverse inertia tensor from local to global coordinates (although it is possible that the question applies to rotation and matrices in general). I''ve come across code in examples where the local inverse inertia tensor (a 3x3 matrix) is converted to global coordinates by doing the following: Rotation Matrix * local inverse inertia tensor * Rotation Matrix Transposed. My question is, why do you do the last multiplication--multiplying by the rotation matrix transposed? I guess my point is, doesnt the result of the first half (rotation matrix * local inverse inertia tensor) of the equation already perform the rotation to global coordinates? And, in some cases, isn''t the transpose matrix equivalent to is inverse matrix--in which case it effectively "undoes" the rotation? Thanks for your help in advance.

##### Share on other sites
If the inertia tensor were a vector then it would be OK, but it''s a special matrix. That''s why the difference. For details check out Baraff''s rigid body document 1.

##### Share on other sites
I have the same question---
I''ve seen the same thing in an explanation of using quaternions to perform rotations.
p*q*p-1

I thinkk the original poster and I have the same question...in many examples I''ve been told to rotate a matrix you must do t he following:
rotation matrix*matrix that is being rotated*rotation matrix inverse

Say, the rotation matrix rotates 90 degrees about the y axis, doesnt the rotation matrix inverse rotate 90 degrees about the y axis in the opposite direction--creating a total rotation of 0 degrees?

##### Share on other sites
Transforming V vector with M matrix:

V'' = M * V

Tansforming V vector with q quaternion:

V'' = q * V * ~q

~q is the conjugate (and inverse too) of q

Transforming inertia tensor with matrix:

I'' = M * I * ~M

~M is the transpose (and the inverse too) of M

##### Share on other sites
With matrix P used to go from base C to C'', A a matrix in C and A'' in C'' (same notations for vectors X and Y) :

X = P X''
Y = A X

Y'' = A'' X''
Y'' = A'' P-1 X
Y = P A'' P-1 X

(P-1 is the inverse of P and equals the transpose for an orthogonal matrix, wich is the case for a rotation matrix)

##### Share on other sites
Thank you for the response to my question, but I am still confused, hopefully
you guys can help out again.
Say I have this matrix that performs rotation of 90 degrees

0|-1|0
1| 0|0
0| 0|1

Also, say I want to rotate the following matrix, using the above matrix

1|0|0
0|1|0
0|0|1

So, I would multiply them right?
0|-1|0_______1|0|0_______0|-1|0
1| 0|0___X___0|1|0___=___1| 0|0
0| 0|1_______0|0|1_______0| 0|1

Which I think is the right anser...but if I continue
to multiply the result by the transpose of the rotation matrix:

0|-1|0_______0|1|0_______1|0|0
1| 0|0___X__-1|0|0___=____0|1|0
0| 0|1_______0|0|1_______0| 0|1

Dont I end up with the original matrix, because the inverse rotation matrix
undid the rotation? Does it effectively not perform any rotation at all then?
Its probably likely that my logic is wrong, and I think I just confused myself..
any explanation would be much appreciated.

[edited by - alsgame on June 6, 2004 7:13:12 PM]

##### Share on other sites
Maybe it has to do with moving stuff back to the origin??

##### Share on other sites
There is no problem : you rotate the identity matrix in one direction and you rotate it back so you have the identity matrix. It is quite normal that the identity stays the identity in two different bases ...

##### Share on other sites
The way I think of it is this:

Ideally you want to compute the angular velocity from the angular momentum, by using the formula

w = J -1L .

The problem is that J -1 is in the local space of the object, and the vector L is in world space. So you transform L into the object's local space by using R T, giving:

w = J -1R TL .

But now the resulting angular velocity is in the object's local space, and you need it in world space. So you tranform back into world space by using R , giving

w = R J -1R TL

(Edit: changed all I's to J's to avoid confusion with identity matrix)

Jim Van Verth
Essential Math for Games

[edited by - jvsquare on June 8, 2004 10:55:39 AM]

[edited by - jvsquare on June 8, 2004 10:56:31 AM]

##### Share on other sites
Thank you for all your responses, especially to jvsquare--looks like I''ve got a new order to place on Amazon.com
Thanks.

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 19
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633362
• Total Posts
3011531
• ### Who's Online (See full list)

There are no registered users currently online

×