Spring instabilities

Started by
11 comments, last by John Schultz 18 years, 10 months ago
i dont really follow you there.

in any case, it should be a matter of the sum of the forces not being zero. that the problem you should be looking for.

posting the relevant code probably helps, but i wont be responding for another hour or twelve.
Advertisement
Figured out the problem. It's fairly subtle, so I'm sure it's caught someone else too.

Spring force is proportional to distance. But if you calculate and update node 1 before calculating and updating node 2, then the distance the spring reads for nodes 1 and 2 will be different.

So you have to calculate all node forces in one cycle, then update them in a seperate cycle.
[size=2]Darwinbots - [size=2]Artificial life simulation
Semi-implicit Euler and Verlet methods can be 100% stable when clamped.

This topic is closed to new replies.

Advertisement