In a pure frictionless environment with elastic collisions (all kinetic energy is preserved),
2 particles (red and blue) colliding with each other and a wall will help calculate the digits of pi. If each collision is counted
(when a particle hits a wall or the other particle) then under special conditions, the answer will be digits of pi.
The key is in the number of times more mass one particle has than the other. To calculate 3, both particles should have the same mass.
To calculate 31, the red particle must have 100 times the mass as blue. To calculate 314, the red particle must have 10000 times
the mass as blue. Generally, to calculate the first N digits of PI, the red particle must be 100^{(N-1)} times the mass of blue.

Show Visuals:

Non Blocking: Speed (lower is faster):