Cart + Pendulum with Physics Engine

previous next

Physics-based simulation of a cart moving along a horizontal track with a pendulum suspended from it. Uses the 2D Rigid Body Physics Engine.

Click near an object to exert a spring force with your mouse. Try changing gravity, spring stiffness, elasticity and damping (friction).

Try setting the spring stiffness to zero to see the cart collide with the walls.

There is a specialized version of the cart + pendulum which does not use the general physics engine.

Also available are: open source code, documentation and a simple-compiled version which is more customizable.

previous next Valid HTML 4.01