This simulation presents a Monte Carlo method used to approximately estimate the value of $\pi$.
Basically, points are drawn within a square with side $2R$,
which has a circle at its center with radius $R$.
As the areas of these geometric shapes are proportional to the number of points within their borders,
the value of
$\pi$ can be estimated from
$$
\pi = \dfrac{4\times \text{Points inside the circle}}{\text{Total points}}.
$$
Buttons:

N: Inserts N points.

Erases all points.
Read more: