Choose Your Own Adventure #1 (Day 4)
Intro to this Adventure
PRE-ACTIVITY: Make sure you have gone through the code for Adventure #1 from Day 3 as we will build off this code.
In Adventure #1 you will be disrupting your fake planetary system with another body in 3D. First, we will work on getting a stable system, and then we will try to mess it up with another body in 3D.
Start with the "START HERE" code in the "Code" section down below. This code is the same as the code from Adventure #1, Day 3, however the zeroing of the z-axis positions and velocities is taken out so that you can add a velocity and position in the 3rd dimension. From what we learned yesterday about the stability of orbits, one thing we might want to try is to start off our orbits such that the velocity vectors are perpendicular to our position vectors. The steps are as follows:
Code

START HERE: Code for plotting orbits in 3D
Code to calculate and plot 3D orbits. Modify to make initial velocities tangential for the possibility of more stable orbits.
Resources

Super Planet Crash!
Can you make a stable system?

Bonus: Orbits Game
Can you please your alien overlords by building them awesome planetary systems?