Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.



This topic is 5524 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

Hello! I have a problem with doing the integration-over-time in my physic-engine. So here''s the problem: at time t0 i have the status sBegin: position (vector) orientation (3x3-matrix) linear velocity (vector) angular velocity (vector) i also have the derivate of sBegin: velocity (vector) rotated orientation (3x3-matrix) force (vector) torque (vector) so how do i get the status of sEnd if i know the time-difference(dt) between t0 and t1? Thanks!

Share this post

Link to post
Share on other sites
If you want to know the change in some physical quantity like Force you can use the approximate expression

ΔF = (dF/dt) Δt

which is valid for small timesteps Δt

Share this post

Link to post
Share on other sites
Basically you have s(t) (state at time t), s''(t) (rate of change of state at time t).

This isn''t enough information for solving the differential equation *analytically* (ie. exactly). You''d need to know the form of s''(t) and integrate that over time analytically - which in most cases (ie. non-toy ones) is (practically, don''t know if theoretically too) almost impossible.

So you need to use an approximation method. The simplest is the Euler approximation:

s(t+h) = s(t) + s''(t)*h

As sQuid pointed out, this is accurate enough for small timesteps h. In rigid body dynamics this approximation is usually good enough, because rigid bodies usually only have small and stable forces acting on them (what I mean is that large and unstable forces can blow-up the simulator with a bad approximation method and a large timestep).

See Numerical Recipes in C (available on the Internet as .pdfs) for more information about some of more accurate and more stable integration methods.

- Mikko Kauppila

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!