PI_APPROXIMATION_TWO

This single page web application implements a Monte Carlo dart throwing simulation (whose runtime is indefinitely large) to approximate the irrational number Pi by dividing the number of darts which land within 200 pixels of the center of a square canvas (whose side length is 400 pixels) by the total number of darts which are plotted on that canvas. One pixel-sized dart is plotted at a random location onto the square canvas per second of the aforementioned Monte Carlo simulation. Darts which are plotted within 200 pixels of the center of the canvas are colored RED. Darts which are plotted farther than 200 pixels away from the center of the canvas are colored BLUE.

pi = (circle.circumference / circle.diameter)

pi_approximation = (4 * (red_pixel_count / (red_pixel_count + blue_pixel_count)))

seconds_elapsed: ???

red_pixel_count: ???

blue_pixel_count: ???

pi_approximation: ???