Estimate pi by dropping needles on lines! This simulator is based on an experiment called Buffon’s needle, one of the oldest problems in the field of geometrical probability, according to The Mathematica Journal. In the 18th century, French philosopher Georges-Louis Leclerc, Comte de Buffon determined that you can approximate pi by dropping needles on a grid of parallel lines (whose spacing is greater than the length of a needle) and calculating the probability that they will cross a line. The probability is directly related to pi. Find more here: https://www.sciencefriday.com/articles/estimate-pi-by-dropping-sticks/
The formula is: 2 * length of stick * total of needles dropped ------------------------------------------ # needles crossing line * length between lines In this simulation I have made the distance between the lines twice the length of the sticks, so I am left with total of needles dropped ------------------------------------------ ~ pi # needles crossing line