Integrating angular damping into angular velocity and rotation

Click For Summary
SUMMARY

This discussion focuses on integrating angular damping into angular velocity calculations using a third-party physics engine. The physics engine applies a consistent angular velocity reduction of 30% per second. The initial approach to predict angular velocity using the equation NewSpeed = OldSpeed - (OldSpeed * Damping * t) fails to maintain accuracy over larger time intervals. A more effective model is proposed using exponential decay, leading to the equation w = w_0 * (0.7)^t, which accurately reflects the continuous decrease in angular velocity.

PREREQUISITES
  • Understanding of angular velocity and its calculations
  • Familiarity with exponential decay functions
  • Basic knowledge of calculus, specifically logarithmic functions
  • Experience with physics engines for rigid body dynamics
NEXT STEPS
  • Research the implementation of exponential decay in physics simulations
  • Learn about advanced angular damping techniques in physics engines
  • Explore the use of logarithmic functions in predictive modeling
  • Investigate how to calculate rotation from angular velocity and damping
USEFUL FOR

Game developers, physics simulation engineers, and anyone involved in implementing realistic motion dynamics in software applications.

cjcone311
Messages
1
Reaction score
0
I'm using a 3rd party physics engine to run rigid body physics. It just updates the bodies once every 16 ms or so. I'm trying to write an algorithm to predict where free-falling bodies will be in 2 seconds using standard physics equations. I'm having trouble with predicting angular velocity and rotation though.

I know the physics engine calculates angular velocity by subtracting 30% velocity/second from the current velocity. If I calculate the angular velocity at t=1 and at t=2, the angular velocity at t=2 is 30% of that at t=1.

I've confirmed that with the physics engine, every frame that is run, the change in angular velocity over the change in time is always 30%.

However, if I try to predict ahead of the object with some time t, using the equation:

NewSpeed = OldSpeed - ( OldSpeed * Damping * t )

the predicted angular velocity loss begins to differ from the real angular velocity loss as t gets larger.

For instance, if I predict the angular velocity at t1=0.1 and t2=0.2 and compare the difference over t2 - t1, the angular velocity loss is about 30%, as it should be.

However, at t1=1.9 and t2=2.0, the difference over t2 - t1 shows an angular velocity loss of about 45%, way more than it should have been.

So, my equation:

NewSpeed = OldSpeed - ( OldSpeed * Damping * t)

Seems to be wrong. I'm wondering if there's some calculus magic that could give me a better equation, with the knowledge that angular velocity is constantly decreasing by 30%.

Thanks for any help - if this gets solved, I'll have a part 2 for my question on how to calculate the current rotation given an initial rotation, initial angular velocity, and angular damping.
 
Physics news on Phys.org
cjcone311 said:
I'm using a 3rd party physics engine to run rigid body physics. It just updates the bodies once every 16 ms or so. I'm trying to write an algorithm to predict where free-falling bodies will be in 2 seconds using standard physics equations. I'm having trouble with predicting angular velocity and rotation though.

I know the physics engine calculates angular velocity by subtracting 30% velocity/second from the current velocity. If I calculate the angular velocity at t=1 and at t=2, the angular velocity at t=2 is 30% of that at t=1.

I've confirmed that with the physics engine, every frame that is run, the change in angular velocity over the change in time is always 30%.

However, if I try to predict ahead of the object with some time t, using the equation:

NewSpeed = OldSpeed - ( OldSpeed * Damping * t )

the predicted angular velocity loss begins to differ from the real angular velocity loss as t gets larger.

For instance, if I predict the angular velocity at t1=0.1 and t2=0.2 and compare the difference over t2 - t1, the angular velocity loss is about 30%, as it should be.

However, at t1=1.9 and t2=2.0, the difference over t2 - t1 shows an angular velocity loss of about 45%, way more than it should have been.

So, my equation:

NewSpeed = OldSpeed - ( OldSpeed * Damping * t)

Seems to be wrong. I'm wondering if there's some calculus magic that could give me a better equation, with the knowledge that angular velocity is constantly decreasing by 30%.

Thanks for any help - if this gets solved, I'll have a part 2 for my question on how to calculate the current rotation given an initial rotation, initial angular velocity, and angular damping.

Lets say at t = 0 you want w = w_0 (using w for omega). You want to model this with exponential decay. Suppose w = w_0 exp(rt) so w = w_0 when t = 0.

Now at t = 1 you want w = .7 w_0 which gives

.7 w_0 = w_0 exp(r*1) so r = ln(.7).

Put that into get your equation for w:

w = w_0 exp(t ln(.7)) = w_0 * (.7)^t

So you have an exponentially decaying w:

t = 0 w = w_0
t = 1 w = .7 w_0 (a decrease of 30%)
t = 2 w = .49 w_0 (another decrease of 30% from t = 1)

and so on.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 9 ·
Replies
9
Views
1K
Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
1
Views
1K