Recently, I have read a very recommended book called “The Interstellar Age: Inside the Forty-Year Voyager Mission” by Jim Bell (see its Goodreads entry). The book, as you can imagine from the title, recounts the story (so far) of the two Vogayer spacecrafts, and of the people who made this possible. There is also a PBS documentary available on Netflix called “The furthest: voyager in Space” that summarizes the content of the book, with interviews and the actual images taken during the mission.
The actual journey of the two probes began on 1977, when with two separate launches, the spacecrafts were sent to the outer space following a trajectory known as “The Grand Tour”. Several years before, the astronomer Gary Flandro (JPL) figured out that in the late 1970’s a rare alignment, which occurs every 175 years, would have made possible an exploration of the outer Solar System. Since then, details of the “gas giants” were known mostly from ground-based observations and from the brief encounters (“fly-by’s”) of the Pioneer spacecrafts. In fact, until the late 1980’s nobody knew how Uranus and Neptune looked like at all.

Actual trajectories of Voyager1 and Voyager2 spacecraft.
Sending a probe, however small, directly to any planet beyond Jupiter is technically very difficult and expensive, to the point that, as we’re about to see, is not even worth trying. In fact, a special maneuver called gravity assist can be exploited to increase significantly the speed of a spacecraft without any need of rocket boosters. The trick is based on the fact that the encounter between a planet and a probe can be seen as an inelastic collision between the two bodies. In practice, the probe bounces upon the planet’s gravitational field and is deflected. In the process, it acquires speed (in principle, a similar maneuver can lead to capture or even deceleration) to the expense of the planet thanks to Newton’s third law of motion (“action and reaction”). However, since the mass of the planet is usually enormously larger than that of the probe, the planet is practically unaffected, while the spacecraft increases its speed to continue its journey. The difficulty, as you can imagine, is to carefully find the correct parameters so that the fly-by happens at the right time and at the right place. That’s why we do not send robots to the outer planets every year: only in particular circumstances, the right trajectory can be determined. The relatively brief period of time available to start the mission is called the launch window.
To give an example of the complexity, but also of the beauty of this procedure, I set up a Processing program (based on my previous simulation of the Solar System) that you can modify to play around with the gravity assist. You can download the code from my GitHub repository. To make the effect more dramatic I increased the mass of the planets by a large factor: in real life, the trajectories have to be defined very precisely in order to get “spot on” on the target planet. It’s rocket science, baby!
After many trials, I managed to “launch” my probe into a trajectory that gives you an idea of how the Grand Tour looked like. For people who (like me) are following enthusiastically the New Horizon mission, I also included Pluto in the simulation. Similarly to Voyager1 and Voyager2, its path passed by Jupiter in order to get the right kick to proceed towards the outer reaches of the Solar System.