The value of PI can be calculated in a number of ways. Consider the following method of approximating PI
Inscribe a circle in a square
Randomly generate points in the square
Determine the number of points in the square that are also in the circle
Let r be the number of points in the circle divided by the number of points in the square
PI ~ 4 r
Note that the more points generated, the better the approximation