My favorite way is to run a simulation to “throw darts” randomly into a square of area 1. You throw the darts by picking a random x coordinate and a random y coordinate uniformly from the interval [0,1]. Then you can find the ratio of darts that land in the quarter circle in the first quadrant (x^2 + y^2 < 1) to the total number, and this should be the ratio of the area of the circle to the area of the square. The area of a quarter circle is pi*r^2/4 ( but r here is 1), so pi/4 and the area of the square is 1. So pi = 4*(darts in circle)/(darts in square)
Latest Answers