The running time of N freely moving balls can be accelerated by using a regular mesh. Only when two balls share a cell (or are in neighbouring cells) are they likely to collide. The 3D ball collision is solved by calculating the distances from the centres of their balls.
9 июн 2024