Home /
Expert Answers /
Computer Science /
in-processing-nbsp-thanks-problem-1-visualize-the-calculation-of-pi-using-probability-develop-pa994
(Solved): IN PROCESSING
Thanks!
Problem 1: visualize the calculation of PI using probability: Develop ...
IN PROCESSING
Thanks!
Problem 1: visualize the calculation of PI using probability: Develop a program to draw a circle inscribed in a square, generate random points inside the square using random() function, also check if each point falls inside the circle as you draw the dots on the screen, (for better viewing, you can use a small solid circle to represent each dot generated each time). Count the number of points inside vs. the total number of points generated. The ratio theoretically should be PI/4. Use your results and the theory to approximate PI. Print those values out in the console window: number of dots inside, total dots generated inside the square, your approximation of PI. Name your program as LastNameFirstname_Asgt04_01.pde and zip it.