GRAVITATIONAL N-BODY WITH COLLISIONS

A simulation of 600 gravitationally interacting bodies, exhibiting behaviour resembling the formation of planetary systems. Gravitational forces calculated with the Barnes-Hut algorithm (J.Barnes, P.Hut, 1986). Spatial hashing is used for broad-phase collision detection. The camera follows the centre of mass of the system.