Simulating comet trajectory in Java.