This is a project that calculates pi up to N decimal places by counting the number of collisions (perfectly elastic) made in a system involving a wall (only on the left), a block of mass m1 (initially at rest) and a more massive block of mass m2 = 10^(2N) * m1 that is moving towards the lighter block. You can change N and then double click the green flag. For N > 1, it is best to use turbo mode.
Warning: especially using turbo mode, the clicking sounds might get annoying, and the blocks will be flashing really quickly. This is inspired by 3blue1brown's (3b1b) YouTube videos on this topic. You can look for these videos for a deeper explanation of why pi appears in this system. This project was made for pi day 2025. #pi #math #physics