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]

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?

Share on other sites

1. Calculate the CM and themoment of inertia at the CM.2. Set the body’s initial position,orientation, and linear and angularvelocities.3. Figure out all of the forces onthe body, including their points ofapplication.4. Sum all the forces and divide bythe total mass to find the CM’s linearacceleration (Eq. 5).5. For each force, form the perpdotproduct from the CM to the point offorce application and add the value intothe 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

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.