We can approximate π using nothing more than random numbers and
some simple geometry: we draw a square with side 2r around a circle with radius r, then we randomly throw darts at it. We count
all of the 'throws'; if a dart lands within the circle, we also count a 'hit'.
For a large number of throws, we see that:
Some half-remembered maths tells us that:
I first solved this problem as an undergraduate
sometime in 1994 as part of a Computational Physics module. Using
Note: each blob having a different radius is
completely irrelevant to the process, it just makes a nicer image.
These comments are generated from replies to this Mastodon