1.5 Running the Code

You can run the code online at Trinket by clicking here .

In your program, change parameters one at a time and observe the difference in results. For example change the initial Earth momentum to

earth.p=vector(0,38e3,0)*earth.m

Play around and record any notable “discoveries”.

1.5.1 If you want to do more

Get an account in https://trinket.io Sign in, create a new trinket program (select Glowscript) and copy and paste the the Sun-Earth code. Now the program is yours!

  • What is the benefit of solving the planetary motion problem numerically (in the method above)?
  • What is the benefit of solving the planetary motion problem analytically (in section 1.3 of the lecture notes)?