###### GS 2000/Math - Collins
Lab 12
Orbits

```In this lab we will use the Orbit Simulator to study the motion
of objects in orbit around one another.

Startup MATLAB.

Click on the link for orbit.m

You can either use "Save As..." to save this in the work folder,
or copy and paste it into a MATLAB m-file and save it in the
work folder.  The name must be orbit.m

Running the Simulator

Just type

orbit

and you will get a window with several fields you can fill out and
two buttons.  To run a simulation, fill in the values
for the fields and then click on "Go".  You will then see your
objects in orbit.

Explanation of Fields

The fields in the upper-left-corner are for the ship.
You can specify it initial position (X0,Y0) and initial
Velocity and Angle (in degrees).  You can also specify
the time-steps between calculations (leave it at 0.5 unless
the results look too jumpy) and the total time of the

The big block of fields on the right are for the other objects:
Planets.  You can use up to 10 planets for your ship to move around.
For each planet you specify its radius (1 = radius of Earth),
and its x and y position.  If you want it to move according to
the law of gravity, you can make it movable (click on the button)
and enter an initial velocity and angle.

If the radius field is blank, then only the planets before that
planet will be used.

Try the Simulator with various values to get comfortable with
how it works.

Assignments

1. Use 1 planet, earth sized and start on the surface.  See what
velocity and angle will get you off the surface.

2. Use 1 planet, earth sized and start away from it.  Try to get
starting values which produce an orbit.  If it doesn't make it
all the way around, increase the max time.  Your orbit probably won't
connect back to itself, but it might.

3. Use 2 planets with the spaceship between them.  Try to get the ship to
oscillate up and down, between the planets.

4. Use 2 planets.  Try to get the spaceship to make an orbit like a
Figure 8.

5. Use 2 planets, one smaller.  Make the smaller one moveable (like the
Moon around the Earth).  Experiment with the spaceship to see if you
can get some semi-stable orbits.

6. Super Challenge Use up to 10 planets, have the spaceships path