Sign in to follow this  

Inertia tensor test?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to implement rotational physics with inertia tensors. To test I implemented I cube with a side length of one. I believe that the setup should be equal to this: D3DXMatrixIdentity(&g_InertiaTensor); float inertia = g_Mass / 12.0f; //inertia of a cube g_InertiaTensor._11 = g_InertiaTensor._22 = g_InertiaTensor._33 = inertia; D3DXMatrixInverse(&g_InertiaTensorInverse,NULL,&g_InertiaTensor); I then calculate the rotation acceleration like this: D3DXMATRIX result; D3DXVECTOR3 t1; D3DXVec3TransformCoord(&t1,&torque,&g_InertiaTensorInverse); D3DXVECTOR3 axis; FLOAT rotation; D3DXVec3Normalize(&axis,&t1); rotation = D3DXVec3Length(&t1); D3DXMatrixRotationAxis(&result,&axis,D3DXToRadian(rotation)); However, When I appy a torque of (0,30,0), which should be a rotation about the Y axis of 30 degree's, the rotation that comes out is 360. Which I gues is expected becasue inverse of 1/12 is 12, times the 30 degrees is 360. What I dont understand is why that would be the case. If I have a cube with a mass of 1, and all sides are 1 in length, why would there be such a large ratio between what I put in (30 degrees) and what comes out (360) degrees. Is this right? Trying to understand this...

Share this post


Link to post
Share on other sites
Ok, so it shout be 1/6 not 1/12, btu that still does make sense for me,, changes the rotation to 180, when i still think it woul be 30. what am I not getting?

Share this post


Link to post
Share on other sites
Quote:
Original post by mososky
However, When I appy a torque of (0,30,0), which should be a rotation about the Y axis of 30 degree's,

A torque of (0,30,0) is not a "rotation of 30 degrees", any more than a force of five pounds is a movement of five feet. The units of torque are force*distance, and torque multiplied by the inverse inertial tensor gives you angular acceleration, not angular displacement.

Share this post


Link to post
Share on other sites
A force of five pounds is does translate to an acceleration of 5 feet per sec if the mass is 1.

Why wouldn't a torque of 30 (using degrees) translate to a angular acceleration of 30 if the mass is 1.

Share this post


Link to post
Share on other sites
I'm not sure if you're being sarcastic there or not. Do you not understand the difference between mass and moment of inertia?

Share this post


Link to post
Share on other sites
I'm trying to. Here is where I'm not understanding.

Reference says inertia tensor for a sphere should be 2/5Mrr; So if you have a sphere with a mass of 1, and a radius of 1 you get this:

inertia tensor = 0.4;
inertia tensor inverse = 2.5;
circumfrance = ~6.3

Given this, I would expect a fore applied to the sphere's surface, which was tangent to the sphere surface would cause the sphere to spin.

To apply an angular acceleration of 360'/sec you would need to get the surface spinning an a rate ot 6.3 per second right?

Since the sphere has a radius of 1.0, a force applied to the surface is 1 unit away. Since torque is calculated from the cross prodcut of the offset of force and the unit of force, it is reasonable to say that the unit of force = torque. The the acceleration = torque * inertia tensor inverse;

working backwards the we want a 360' angular acceleration, so 360/2.5 = 144. So to get that rotation the torque vector would be 144 in length.

Now to me,, logically the torque vector would be equal to the circumfrance of the sphere (~6.3). Because if you accelerate the surface to speed equal to the cicumface per sec, the sphere would be spinning at the circumfrance per second, (duh).

But with the tensor logic, i'm being told i need to apply a force of 144 to get a sphere with a mass of 1 and a radius of 1 to spin once per second?

doesnt seem right, must be thinking about something wrong.

Share this post


Link to post
Share on other sites
Quote:
Original post by mososky
To apply an angular acceleration of 360'/sec you would need to get the surface spinning an a rate ot 6.3 per second right?
There's no such thing as an angular acceleration of 360°/sec. That describes an angular velocity, not an angular acceleration. Did you mean an angular accleration of 360°/sec^2, such that after 1 second the object would be rotating at 360°/sec, and in that time would have rotated 180°?
Quote:
Since the sphere has a radius of 1.0, a force applied to the surface is 1 unit away.
Not necessarily, but sure, let's assume you're applying your force at the sphere's surface.
Quote:
[more math]....So to get that rotation the torque vector would be 144 in length.

Yes. Assuming SI units, the torque would need to be equal to 144 N*m. (newtons*meters.)
Quote:
Now to me,, logically the torque vector would be equal to the circumfrance of the sphere (~6.3)
The circumference of the sphere is in meters, not N*m. The two quantities can't be equal, even if they happen to have the same number in front of them (which they don't here). They describe different properties of the object.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this