Ball Physics Animation

Click, drag, release

images/gravity-ball.js

 

This is a mathematical model of ball physics that includes:

It is not super accurate, as it only does the collision calculations about 25 times a second so it can "jitter" when objects are packed closely, or let objects overlap when gravity or density is high. But otherwise it is pretty cool!