Ball Physics Animation
Click, drag, release
images/gravity-ball.js
This is a mathematical model of ball physics that includes:
- momentum and collisions
- gravity
- mass
- drag from air (1), water (1000) or denser fluids (up to 10000)
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!