Simply play the simulation. The particle will shatter upon contact with the mass body, and the simulation outcome can be modified in the code.
This a a general gravity and orbit simulator.