Simulation · as seen in our π-collisions reel
π collisions
A small block sits between a wall and a heavier block that slides in. Count every hit. Make the big block 100 times heavier and the count gains a digit of π.
Hits0
Mass ratio1 : 10,000
π = 3.14159…0
Big block mass
The small block is always 1 kg.
Slow-mo switches on by itself where the hits bunch up. The label always shows the real factor.
What you're seeing
Every collision is perfectly elastic (no energy lost) and nothing has friction. The page counts every hit, block on block and block on wall: 3 for equal masses, 31 for 100 kg, 314 for 10,000 kg and 3,141 for 1,000,000 kg. Those are the first digits of π.
- It's exact, with no time step. The page works out when the next collision happens and jumps straight to it, so the count can't be wrong at any playback speed, even with 3,141 hits packed into a fraction of a second. The same count is checked two more ways: a loop over velocities only, and the formula N = ⌈π / arctan √(m/M)⌉ − 1.
- Why π: if you measure each block's speed scaled by the square root of its mass, every collision becomes a reflection that turns the motion by the same small angle, 2·arctan √(m/M). The hits stop once the turning adds up to about π, so the count is close to π / arctan √(m/M). G. Galperin, "Playing pool with π", Regular and Chaotic Dynamics 8(4), 2003.
- Both blocks are drawn as cubes of the same material, so 100 times the mass is ∛100 = 4.64 times wider. The bigger ones don't fit on the screen.