Car Suspension

previous next


Physics based simulation of a simple automobile suspension in 2D using the 2D Rigid Body Physics Engine. The car body is represented by a rectangular block, the wheels by 2 small circles. The car body has about 10 times more mass than the wheels.

Drag the car with your mouse. Use the arrow keys to apply a thrust force to the car. Change parameters such as gravity, car mass, wheel mass, spring stiffness, and friction (damping).

There are two configurations of the car: in one the wheels are attached only by springs; in the other the wheels are attached by a rigid rod and also a spring. There is a menu to choose the configuration.

Note that the springs have a dampimg parameter that operates only when the spring is compressed or expanded. The other damping parameter slows down the motion of the bodies thru space.

Also available: source code, documentation and how to customize.

This web page was first published January 2011.

previous next Valid HTML 4.01