This simulation shows 5 masses connected by springs and free to move in 2 dimensions.
You can change parameters in the simulation such as gravity, mass, spring stiffness, and friction (damping). You can drag any mass with your mouse to change the starting position. The red springs can be set to have a different stiffness and length than the other springs.
Click the buttons below for various pre-set combinations of parameter settings.
The math and physics used in this simulation are similar to the
2-D Spring and
Double 2-D Spring simulations. However the masses
can also collide with the walls; the collision handling is similar to the
Colliding Blocks simulation. The only novel bit of
math occurs when a mass is pinned against a wall: in that case we add up the net forces
on the mass and set the acceleration to zero if necessary.
Also available are:
open source code,
documentation and a
simple-compiled version
which is more customizable.