Simulation of boxes collisions to calculate PI