Estimation of Pi

Pi can be estimated by generating random points and testing whether or not they fall inside the unit circle.
Pi is approximately 4 * nHits/nTrials.

Warning: The test for 100000 trials may take awhile. The final image is interesting, though.


To see this applet, you must enable Java.

The source.

Home

Modified: November 8, 2001
Created: November 10, 1998 Version: 1.4