HOME

Monte-Carlo Approximation of π

Hit-or-miss approach with a unit circle and a unit square. The ratio of hits outside the circle (distance from origin greater than radius) to the hits inside the circle can approximate π. This is because π can be defined as the quarter-circular area divided by the squared radius.