Using Chorus Fruit to Approximate Pi in Minecraft

Minecraft 1.9 introduces a new fruit which teleports a player randomly within a 64x64x64 cube. The obvious intended use of this new feature is Monte Carlo simulations.

One example of the Monte Carlo method is approximating the value of pi. You can do this by randomly picking points within a square, and then counting the number of points which fall within a circular arc.

To do this in Minecraft I (with some help), built a 64x64 square around a circular arc, stood in the center and ate a chorus fruit to randomly teleport within the square, marked the position, and then repeated.

The approximation gets better as you sample more points. In our case, we got to about 2.99 - not great, but still a demonstration of a powerful technique. The limiting factor here is the 64x64 square, where the best you can do is 3.10 if you actually count all of the squares.

Update: After posting on reddit, user yut951121 asked a good question: