Modeling Asteroid Trajectories in 3D
This Demonstration simulates the effect of gravitational acceleration on a moving body. Build your own asteroid with realistic mass, radius, and high-resolution texture mapping. You can vary the the mass, position, velocity, and time in the orbit of the asteroid, or switch between any of the planets in our solar system. The size of the asteroid is relative to each planet's mass, so if it is too hard to see, increase its size.
In this Demonstration, I used the second derivative to simulate the acceleration due to gravity, with a When event that specifically eliminates a singularity error.
The Demonstration uses texture maps, either from the Mathematica Texture examples or texture maps from . For spherical planets I had to apply the texture directly to SphericalPlot3D; I turned nonspherical objects into a spherical plot. I took the example data of the captured asteroid Phobos and mapped the object after interpolating enough data points.
 J. Hastings-Trew. "JHT's Planetary Pixel Emporium." (2006) planetpixelemporium.com/planets.html.