Buffon’s Needle Problem

This is the project I made to participate, and also be one of the winners of Swift Student Challenge 2023, that basically explains a math problem: The Buffon’s needles problem.

This problem is essentially a problem that Buffon, a French mathematician of the 1700s, solved. He noticed that dividing a surface in equal sections, and let an indefinite number of needles drop on this surface, the probability for the needles to land of the dividers, after a long series of calculation, is related to the number Pi, so actually, if you reverse the formula, and approximate the probability for the needles to land on the surface dividers as numbers of needles actually landed over the total number of needles, you can actually calculate the number Pi, as accurate as the number of needles grows.

Screenshot of the app

                             

GitHub

View Github