Graphical simulation of the gravitational interactions between particles in space