Press Green Flag to randomly stamp dart sprites somewhere in the square. Press space to reset darts. Click variables to hide them Press D to show them. https://scratch.mit.edu/projects/125518288/#editor all time circle = cloud darts that fall in circle all time square = cloud darts taht fall in square π/4 - cloud ratio of cloud darts that fall in circle to darts that fall in square π - 4*π/4
I read about using a dart board to estimate pi, but I forgot who wrote the article. Or maybe it was a YouTube video: https://www.youtube.com/watch?v=M34TO71SKGk area of circle = pi(r)^2 area of square = (2r)^2 = 4(r)^2 ratio of area of circle to area of square = pi/4 The probability of a random sprite landing in the circle given that it lands in the square is roughly pi/4. Since zero's pixel has the same width as other pixels, the radius of the circle is 180.5 pixels instead of 180 pixels. Using 180.5 pixels as the radius seems to generate a more accurate estimation for pi.