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: July 17, 2000
Created: October 13, 1997