The following project is a javascript simulation of particles. it predicts the path of particle AND The particle's position and velocity are updated on basis of influence of other planets .
you can add more particles to have the required view according to your need. Also, the color of arrow indicate the intensity of gravitational field acoording to the planets position.
Click - create a new particle
Shift + click - create a new attracting body
Click and drag (empty space) - adjust particle's initial speed and direction
Click and drag (on an attracting body) - displace the attracting body
inside in the file you can find code which may help you in other animation effects.