Another beauty from The nature of code that simulates gravitational attraction, using vectors.
View code on Github