Python algorithm that simulate the trajectories of particles under influence of the gravitational of other surrounding particles