n-Body gravitational simulation