Skip to main content
GameDev.net gamedev.net
🔒 Locked

torque to angular velocity

Started by michael879 Jun 29, 2006 at 11:52 PM 3 replies 1k views
Original Post
michael879
michael879
yea I have another question about this stuff. Once I find the total torque of an object, how do I convert this to angular velocity, and then to angular position? I had an idea but it has some problems with it. I could make angular velocity a vector and just do aVelocity += torque * dt in each step. Then I could have a forward, up, and right vectors for the object that I rotate around the aVelocity vector by |aVelocity|*dt radians. The problem with this is if there are multiple angular velocities. Imagine a cylinder spinning on its axis going through the circlular ends. Then imagine applying a torque against one of the other axes (axises?). This cylinder would have 2 seperate angular velocities that my model would be unable to simulate right?
mrbig
mrbig
Angular acceleration is:
a = T / I
While 'T' is the torque and 'I' is the moment of inertia.

Angular velocity is:
w += a * timeDelta
In programming terms, that is.

[EDIT]

More specific:

Ftan = m * Atan
Atan = r * a
Ftan = m * r * a
Ftan * r = m * r^2 * a
T = Ftan * r
I = m * r^2
a = T / I
michael879
michael879
yea my bad, I meant that. It doesnt answer my question tho.
Zakwayda
Zakwayda
Quote:
Original post by michael879
The problem with this is if there are multiple angular velocities. Imagine a cylinder spinning on its axis going through the circlular ends. Then imagine applying a torque against one of the other axes (axises?). This cylinder would have 2 seperate angular velocities that my model would be unable to simulate right?
There shouldn't be any need for multiple angular velocities. If you're consistent about what space forces are applied in and angular effects are tracked in, you should be able to express all angular effects in a uniform manner.

It can sometimes be convenient to offer utility functions that allow you to apply forces in different spaces. For example, to get the cylinder rotating faster about its long axis, you would apply a force in local space perpendicular to this axis and offset from the cylinder center. However, this 'local force' function simply transforms the force into world space and applies it there, so that it can be combined naturally with other external forces.

There are probably other ways to manage the details, but AFAIK there's no need to track the state separately in world and local space.
michael879
michael879
what would the velocity vector be of a cylinder rotating around 2 axes then? I dont see a way to represent that with a single vector. The motion is clearly possible, take a screwdriver, and spin it along its long axis while throwing it up, itll rotate slightly around its shorter axis.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.