Jump to content
  • Advertisement


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


(2nd order) Runge Kutta & Rigid body dynamics

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

Hi there, I''m trying to implement some basic rigid body stuff. I read the Baraff articles and some other documents and I want to implement a Runge Kutta solver. (I did Euler and that is simple enough). I can''t quite get my head around this: The force applied to a body is a combination of a large number of different forces (gravity, outside pushing, objects colliding) From the applied force and the body''s mass I should be able to derive the accelleration and (with Euler) derive the new speed from that. But when I want to implement the midpoint method (2nd order runge kutta) I have to to an inbetween step. This would mean (if I''m correct) that I have to re_determine the acceleration (in this case) again, but now at time t0 + 1/2*steptime. If my acceleration would be a simple function I would know how to do this, but (if I''m correct) it isn''t. So, given mass and force at time t0, how would I derive speed using second order Runge Kutta? Greetz, YarnisO. P.s. This will probably be one of those "oh, of course" cases, but right now I just can''t figure it out.

Share this post

Link to post
Share on other sites
I just realized....
If I would make force objects (GravityForce, FrictionForce, SpringForce etc.) and attach them to the bodies if appropriate (you wouldn''t realy have to implement GravityForce, but that''s just an example), then your acceleration "function" would be implemented in terms of the xxxxForce objects. And that would solve my "having no explicit acceleration function" problem, wouldn''t it????

Hmmm.... if that is right, then why did I spend the entire day thinking about this?? =0)

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!