Hi David, thank you for your response.
This code is attempting to solve the 2D version of Olber's Paradox. The problem statement is as follows:
Robin Hood is standing in the middle of a forest. On average there is one tree of radius one meter per 200 square meters. If Robin Hood is placed at a random location in the forrest and shoots an arrow, how far will it travel?
We consider the trees as points in a 200 meter square area and the arrow as a line two meters long. We need to figure out how far the arrow has to travel before it sweeps out an area of 200 square meters. So, we get 100 meters.
The mean of all the numbers printed in the code divided by the number of times it was ran should give 100 meters. Mean[Distances] // N = approximately 100.
It comes from this site: https://sites.google.com/site/themontecarlomethod/home/robin-hood