Processing Pi
A downloadable game for Windows, macOS, and Linux
Some of the first programs I wrote on an Apple II back in the day were methods of computing pi that I found in a library book on the history of pi. Here's one of those methods, implemented as a Processing app: calculates pi by randomly generating points (think of it as throwing darts at a board) within a square bounding a circle. The ratio of points inside the circle to the total points (approximating the area of the circle divided by the area of the enclosing square) should converge to pi/4.
Source is on Codeberg
Download
Development log
- CleanupJul 21, 2021
- A bit of polishOct 14, 2020
- split downloadsOct 13, 2020
- Processing PiOct 01, 2020
- Playing around with ProcessingSep 30, 2020
