[ODE] Springs with ODE

Jon Watte hplus-ode at mindcontrol.org
Sat Feb 21 07:20:07 MST 2004


> I have to do a Spring based graph visualization algorithm. And I had been
> looking through ODE and couldnt find direct support for spring systems so I
> guess I have to implement them by myself... The problem is that I dont know
> what kind of joint to use and where to position it...


This had me guessing for a long time, too. There is some mention of springs in the documentation, but it's very brief and fairly cryptic.

What it means is that you can set a constraint on some joint (typically a slider) that will attempt to move that joint to a centerpoint. You do this by setting both stops at the same position; the position you want as a sprint center-point. You can play with the CFM and ERP for that specific constraint to simulate various spring behavior. You may also need to multiply distance-from-center with your spring constant and set that as the available force for the constraint; I forget the exact details.

Hopefully, this should be enough to get you going.

Cheers,

			/ h+




More information about the ODE mailing list