Jump to content
• Advertisement

#### Archived

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

# Integration-method?

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

##### Share on other sites
Advertisement
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

##### 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

##### Share on other sites
Thanks for replying!

I''ll try to find it in the internet...

Sesam

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
Rutin
16
4. 4
JoeJ
13
5. 5
• Advertisement

• 10
• 9
• 14
• 10
• 25
• ### Forum Statistics

• Total Topics
632646
• Total Posts
3007637
• ### Who's Online (See full list)

There are no registered users currently online

×

## 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!