Pi from Scratch
Click the green flag to begin calculating pi. Ideally, the longer you allow this simulation to run, the more closely it will approximate the value of pi.
This calculation, estimates the area of a circle and uses that estimation to calculate a rough estimate of pi.
Don't expect this to yield extremely quick or accurate results. -intended only as an illustration of a simple way to calculate pi.
Want to calculate pi on your own? Let the simulation run for a while and then stop it. Divide 'inCount' by 'total' and finally multiply by 4.
pi = ( inCount / total ) * 4
For a more detailed explanation,
Also, see these other pi calculation demonstrations:
Wallis & Leibniz Methods