N-body simulation

The N-body example simulates the Newtonian gravitational forces on a set of massive bodies in 3D space, using a naive direct ( O(n2) ) algorithm. N-body simulations are widely used in physics and astronomy.