https://www.youtube.com/embed/LHvR1fRTW8g

This video from Minute Physics explains why it's difficult to use a rocket to get into the Sun—just in case you want to launch nuclear waste into a giant solar disposal system.

It's a great video, but it made me curious. How difficult would it be to just guess at a launch angle and speed to hit the Sun? Here is a quick program for you to try. Basically, you start with a spacecraft on the Earth. You can grab (with the mouse) the yellow arrow and drag it around. A longer arrow means a greater launch speed relative to the Earth's motion. When you let go, it will run for a little bit and you can see how close you get to the Sun. If you want to restart, just click the play button at the top. Oh, you might want to "zoom out" at some point—just use your scroll wheel on your mouse.

How does it work? If you want all the details, you can check out this post on the three-body problem. It should have everything you need to get started playing with this code. But the basic idea is to calculate the gravitational force between the new spacecraft and the Sun. This gravitational force then changes the momentum of the spacecraft and we can use the momentum to find the new position of the spacecraft. The big idea behind a numerical calculation like this is to break the problem into these small steps where we can make some simplifying approximations.

Oh, I forgot that there is a little bit more to this particular program. I had to add in a part where the code checks to see if you moved that arrow for the initial speed of the spacecraft. If you don't find that part very clear—I'm with you. I often make some mistakes with mouse interactions. Really, it's the physics that's important.

Homework

I think this is a fun little program to play with, but there is so much more that we could do. Here are some homework questions for you. Don't worry, some of them should be fairly straightforward (but some are quite challenging).