This simulation shows Comet 103P (Hartley 2), which had close encounters with Jupiter in 1947 and 1971 that dramatically changed its orbit. As a result of this, its perihelion is now much closer to the Sun than it used to be.
If you run the simulation forward, you can watch the close approaches to Earth in October 2010 and September 2023, followed by close encounters with Jupiter in 2054, 2065, 2076, and 2088. Each of the close encounters with Jupiter changes the orbit of the comet, but none of the changes are particularly dramatic.
If you run the simulation backward, you can watch the close encounters with Jupiter in 2005, 1993, 1982, 1971, and 1947. Each of the close encounters with Jupiter changes the orbit of the comet, with the changes in 1971 and 1947 being particularly dramatic.
Since different computers run at different speeds, you may need to edit the evolution time step to get the simulation to run at an acceptable rate.
You can find out more about Comet 103P (Hartley 2) from the following website:
Copyright © 2005-2023, AstroGrav Astronomy Software