Math
Mathematical billiards
A point bouncing inside a wall with equal angles, for ever. Inside a circle the angle never changes: the path avoids a smaller circle it can never enter, and a rational rotation closes into a polygon. Inside a stadium - two half-circles joined by straight walls - nothing is conserved but the speed, and two paths a billionth of a degree apart are a table's width apart after twenty bounces. The panel measures that: the separation is fitted against an exponential AND against a straight line, and which one fits is the answer.

What happens
A point inside a closed wall, bouncing for ever with equal angles and no loss of speed - everything that follows comes from the shape of the wall. In a circle the angle to the wall is conserved, so the path stays outside a smaller circle, the caustic, and closes into a polygon when the rotation is a rational fraction of a turn. In an ellipse a different quantity is conserved, and a ball through one focus passes through the other for ever. Cut the circle in half and pull the halves apart - Bunimovich's stadium - and two paths a billionth apart separate by a factor of e every bounce. Try the three walls, watch the caustic, then read the separation the panel measures.
Equations used in the module
Equations
v' = v − 2(v·n)n, |v| conserved
circle: angle to the wall constant, caustic radius R cos α
ellipse: J = v_x²/a² + v_y² − (x v_y − y v_x)²/a² conserved
stadium: separation of two paths ~ e^{λn}, λ ≈ 1.0 per bounce

