Presets
Playback
Parameters
Layers
Model check
The science
Free flight
Between contacts a ball follows a parabola, updated exactly each step: y ← y + v dt - ½ g dt², v ← v - g dt, with optional linear air drag -k v/m.
Bounce with restitution
At a wall the normal speed becomes -e vn. A ball dropped from height h therefore reaches h e² after the first bounce and h e2n after n bounces. The flight times form a geometric series and the total time until rest is T = sqrt(2h/g) (1 + e)/(1 - e).
Ball-ball collisions
For two balls with masses m1, m2 the normal velocities change by an impulse J = (1 + e) μ vrel,n, with reduced mass μ = m1m2/(m1+m2). Momentum is conserved exactly; the kinetic energy lost is ½ μ (1 - e²) vrel,n². Mass follows the volume of a sphere, as in the 3D box.
Checks
(1) A single ball simulated with this integrator is compared with the total bounce time formula. (2) A head-on two-ball collision with e = 1 conserves momentum and kinetic energy. (3) The energy ledger of an isolated three-ball run: kinetic + potential + dissipated stays constant.
Simplifications
A vertical slice of the 3D box: discs, no spin, no rolling friction, instantaneous collisions with one restitution coefficient, small overlaps resolved by pushing balls apart.
What to try
- Set e = 0.9 and e = 0.5 and compare how long the motion lasts (fourth graph).
- Turn gravity to the Moon value and watch heights scale as 1/g.
- Grab a ball and throw it into the pile.