After pressing the green flag select any big block texture and any small block texture. I only added the different objects for fun. (My favourite is the banana-taco combo). Then select a 'Precision of estimate' value with the slider. You can select the counter variable to show to be able to see the exact value if you want. Press the cog in the bottom right corner to open and close the settings page. To start the simulation press the 'Start' button. To reset the simulation press the 'Reset' button. You will be able to see the big counter updating underneath the real value of Pi so you can directly compare the approximated value with the true value. The value of 7 takes far longer than lower values. Any value below 6 is pretty good to view and 6 or above is a lot slower.
I decided to make this project after watching this video by 3blue1brown https://www.youtube.com/watch?v=jsYwFizhncE . Please watch the video to learn more! This technique to approximate a value of Pi is quite extraordinary but not particularly efficient (as you will clearly be able to see in the project when you try to compute more than 5 digits of Pi) If anyone is able to remix this and potentially find a more efficient solution solve the problem differently please do so. I have tried my best to optimise the code but I have only managed to make up to 5 digits be pleasant viewing, although it will calculate 7 digits if you are patient. Please leave all feedback in the comments, I do read all comments! Let me know if you find any bugs. #trending #pi #maths #all