Enable javascript to see screen shots.

prev next

Spring Simulator

Project Members:
Programmer: Jason Eaton

Languages: ActionScript 3.0

Date Added: 4/8/2011

See it right here
Box2d like version

This is a spring simulator I made for a final project of a computer animation class. It allows you to add in springs and nodes with the mouse, and set thier weights and spring constants. It also allows you to swtich between a Euler and Verlet solver. The final product was ok, but I wasn't happy with how the ropes would just go limp after one half swing (try loading rope.txt).

That prompted me to study how Box2d handled constraints, and ended up making a modified version that uses a more like Box2d model. That version actually does not have springs, just stiff rods basically. Also the Verlet isn't really implemented, so it goes crazy if you set it to Verlet (Box2d uses all Euler). However if you load the "stiff.txt" file, it swings back and forth very nicely. I planned on using this algorithm to make ropes in my future side scrolling games.

When these run outside of html, they ususally run smoothly, which is what I codded it for. Since Flash is goofy, when they are embedded in html, the frame rate falls significantly.