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:

$\frac{\mathrm{hits}}{\mathrm{throws}}\approx \frac{\mathrm{area-of-circle}}{\mathrm{area-of-square}}$
Some half-remembered maths tells us that:

$\frac{\mathrm{area-of-circle}}{\mathrm{area-of-square}}=\frac{{\mathrm{\pi r}}^{2}}{{\mathrm{(2r)}}^{2}}=\frac{{\mathrm{\pi r}}^{2}}{{\mathrm{4r}}^{2}}=\frac{\pi}{4}$
Or:

$\pi =4\left(\frac{\mathrm{area-of-circle}}{\mathrm{area-of-square}}\right)\approx 4\left(\frac{\mathrm{hits}}{\mathrm{throws}}\right)$
I first solved this problem as an undergraduate
sometime in 1994 as part of a Computational Physics module. Using
FORTRAN 77.

Note: each blob having a different radius is
completely irrelevant to the process, it just makes a nicer image.