Distance Constraint

Started by
2 comments, last by mokaschitta 12 years, 10 months ago
Hi,

I am currently trying to understand the theory behind soft distance constraints as discussed in the 2010 GDC presentation of the Box2D creator (can be found here http://www.box2d.org/) since they seem to be a great way to model rather stiff springs that are always stable. Anyways my main problem is that until now the only types of constraints I used are ordinary springs. How exactly is a distance/rigid constraint expressed in the first place? I am not sure why, but google didn't really help me on that subject, so maybe I am just looking for the wrong terms. Basically how can I connect two points A and B with a distance/rigid constraint ? Any links, short code snippets would be great!

Thanks
Advertisement
I've found Jacobson's article to be a great starting point for setting up simple physics things. The article explains how to get a servicable particle physics system going (which can be used to simulate more than you might think) and it shows how to create so called stick constrains (basically fixed distance constraints) between two points. I'm not sure if it'll work with the Box2D stuff, but it might prove an interesting read. The basic idea is that given enough iterations in which you set points A and B at a fixed distance (this is what Jacobson calls relaxation), the points will end up at acceptable locations.
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!

Hi,

I am currently trying to understand the theory behind soft distance constraints as discussed in the 2010 GDC presentation of the Box2D creator (can be found here http://www.box2d.org/) since they seem to be a great way to model rather stiff springs that are always stable. Anyways my main problem is that until now the only types of constraints I used are ordinary springs. How exactly is a distance/rigid constraint expressed in the first place? I am not sure why, but google didn't really help me on that subject, so maybe I am just looking for the wrong terms. Basically how can I connect two points A and B with a distance/rigid constraint ? Any links, short code snippets would be great!

Thanks


I discuss the implementation of a distance constraint in my blog post:

http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/

Hope that helps!

Cheers, Paul.
thanks, those seem to be good starting points!

This topic is closed to new replies.

Advertisement