Sign in to follow this  

Dynamics and Rotation

Recommended Posts

I'm currently implementing the dynamics (as well as learning) but I'm stuck on the rotation. I know that, when a force is applied to a bodys center of mass, the bodys velocity changes, but not the rotational velocity. Now given a force, applied to an arbitrary point P, how does this affect it's velocity and rotational velocity? I think this might not be that easy for complex bodies, but let's assume my body consists of N shapes that can be treated as a point with the mass Xn. How do I calculate the angular velocity for this body? I'm not looking for something fancy/real, it should provide good looking results. [Edited by - SiS-Shadowman on August 17, 2009 1:31:48 PM]

Share this post

Link to post
Share on other sites
I'm not a physics expert so maybe I'm missing something simpler, but:

F = force
r = radius
a = angular acceleration
I = moment of inertia
T = torque
* = scalar multiplication
x = vector cross product

T = I * a
T = r x F.


r x F / I = a

Given the center of mass you can compute the vector from the point the force is applied to to the center of mass, giving you r. Your body is simple so you should know the moment of inertia (I), and from that you can calculate the angular acceleration. To have the thing slow down over time instead of constantly accelerating forever, you could just reduce the acceleration slightly each frame, letting it drop below 0 until the rotation stops.

Again physics was always one of my weaker areas, so I'd be more than happy for someone to provide an altnerative.

Share this post

Link to post
Share on other sites
Thanks for the quick explanation, I do have more questions though.
I think it boils down to the question: how do I express the measures that are involved in an objects rotation / angular velocity / Moment of Inertia in my game? Like with simple newtonian dynamics, my object has a position, a velocity and a mass. When doing the dynamics and I want to apply a force, I simply divide my force by the timestep and add that to the current velocity. Then I do the same with the velocity and add that to my position.
But I'm clueless what I need to do with the rotational part. From the first article mentioned, I got that I would need to store the Moment of inertia tensor, but apart from that I don't really have a clue.

Another thing I didn't get is how would that force change my bodys velocity?

[Edited by - SiS-Shadowman on August 17, 2009 1:25:06 PM]

Share this post

Link to post
Share on other sites
Check out these articles (you can probably find more)

Implementing a full 3D rigid body simulation is not a simple task at all, good luck :)

Share this post

Link to post
Share on other sites
Thanks for that link. I've just read article 1 and 2, however something really bugs me:

1. Calculate the CM and the
moment of inertia at the CM.
2. Set the body’s initial position,
orientation, and linear and angular
3. Figure out all of the forces on
the body, including their points of
4. Sum all the forces and divide by
the total mass to find the CM’s linear
acceleration (Eq. 5).
5. For each force, form the perpdot
product from the CM to the point of
force application and add the value into
the total torque at the CM (Eq. 11).

#4 basically claims that no matter where I apply a force on the body, it's linear velocity will always be the same. However I cannot agree with that. When I apply my force to the center of mass, all that force is used to change the linear acceleration only, but not the angular. If I apply my force to the outer edge of a sphere, for example, then (ideally) it's linear acceleration would not change, only the angular one.
Am I missing something or is this part wrong?

Share this post

Link to post
Share on other sites
I think it's just language abuse, you're right that depending on the point of application and angle of the force, part of the energy is transferred as linear moment, and part of it as angular moment.

Share this post

Link to post
Share on other sites
we're talking about rigid bodies here, when you apply the force off center, the rigid body condition forces the body to rotate. I don't think you can say that the force is split in a linear and angular part. You could talk about kinetic energy in linear motion and rotation energy, this can be split. When you apply the force in the center, we could say the work done is f*ds (distance) , but if you apply the force off center the f*ds changes because the body starts to rotate. Hopefully someone can answer this more clearly.

Share this post

Link to post
Share on other sites

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