Bouncing balls and elasticity

Box of 3D balls under gravity. Tune how much energy each impact keeps.
Kinetic energy
Potential energy
Total energy
Lost to impacts
Mean speed
Impacts per second
The science

A bounce is an impact that is not perfectly elastic. The coefficient of restitution e is the ratio of separation speed to approach speed along the contact normal. Energy kept per impact is e² of the normal kinetic energy, so a dropped ball loses energy geometrically.

v′n = −e vn (wall) Δp = (1+e) vrel,n / (1/ma + 1/mb) (two balls) hn = e2n h0, ttotal = √(2h0/g) (1+e)/(1−e)

Honest simplifications. Spheres only, no spin or friction at contacts, instantaneous impacts with a constant e (real e falls with impact speed), linear air drag instead of quadratic, mass ∝ r³ at an effective 100 kg/m³ (hollow ball), semi-implicit Euler with 8 sub-steps per frame. Resting stacks are not stabilised by a contact solver, so very low e piles can jitter slightly.

Independent numerical checks
Made with 🟠 Blender · Three.js