Pile Attract

previous next

Interactive simulation showing objects with mutual gravitational force pulling them together. Uses the myPhysicsLab 2D Rigid Body Physics Engine.

Click near an object to exert a spring force with your mouse or finger. Click rebuild to get a new set of randomly sized objects. Try changing gravity, elasticity (bounciness), and damping (friction).

Turn on the show forces checkbox to see the gravitational forces between the center of mass of each object and the contact forces where objects touch each other.

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

This web page was first published November 2016.

previous next Valid HTML 4.01