Loops and Orbits

Programming for Aspiring Rocketeers

Jan Term, 2020

DRAFT, May 19th, 2019

Prof. Brian Hill

Brief Course Description

We will write programs to solve some of the most interesting problems in mechanics: free fall in a uniform gravitational field, free fall in Newton's Universal Theory of Gravitation, circular planetary motion, elliptical planetary motion, and the fuel burns needed for spacecraft launches. We will harness a specialized version of the Python language called VPython that is specifically designed to solve mechanics problems. You will need no calculus. However, you will need the same preparation (Math 12 or Level 3 Math Placement) that you would need if you were about to learn calculus. You will be scratching the surface of the field of computational physics that is used for problems as diverse as sea level rise and stellar formation.

Detailed Course Description

Only the very simplest of physics problems can be described with algebra and geometry alone. That said, introductory physics is mostly taught in year-long courses using only algebra, the first semester of such a course focuses mostly on mechanics, and there is already more than enough content in a semester of algebra-based mechanics to prove daunting for most college students.

Furthermore, while daunting, such courses, even when mastered, are simultaneously deeply dissatisfying, because the unifying principles of physics required to tackle harder physics problems require the infinitesimal calculus. Calculus-based physics is mastered by an even fewer number of college students, and yet is one of the greatest and most technologically significant legacies of the human mind. Is there an alternative way to access it?

The answer, I and others believe is “yes,” (or this syllabus would not be written), and the means is the field of computational physics, which is typically not taught until at least the fourth semester in an undergraduate's career, despite its fundamental simplicity and its centrality in 21st century physics.

In this course we will approach mechanics using computational physics instead of calculus. We will solve some of the most interesting problems in the introductory mechanics course: free fall in a uniform gravitational field, free fall in Newton's Universal Theory of Gravitation, circular orbital motion, circular elliptical motion, and finally we will compute the transfer orbits that spacecraft use to do things like launch geosynchronous satellites.

Newton's gravitation thought experiment

Caption: Newton's thought experiment in Newton's Principia (source: Wikimedia)

You will be developing an intuition for calculus, not using the infinitesimal calculus, but by having a computer solve mechanics problems on a fine temporal mesh.


It would be pointless and circular if a course that is supposed to help you develop an understanding of mechanics and calculus required calculus as prerequisite.

However the same math that makes one ready for calculus makes one ready for computational physics, and therefore Math 12 or Level 3 Math Placement is a prerequisite.


10% for each of 6 assignments. Two computational physics tests worth 10% (after first third of course) and 15% (after second third of course). Finally, you will choose your own problem to develop and deliver as a presention in the final week of the course for 15% of the grade.

Weekly Schedule

Week 1

  • Physics: The Description of Motions of Objects Using Coordinates (Kinematics).
  • Programming: Elements of Python and VPython. Editing Programs, Program Execution, Variables, Conditionals.

Week 2

  • Physics: The Problem of Free Fall in One and Two-Dimensions in a Uniform Gravitational Field.
  • Programming: Versioning of Code. Loops, Arrays.

Week 3

  • Physics: The Problem of Motion in Two-Dimensions in Newton's Universal Theory of Gravitation (Planetary Orbits). Selection of Final Project
  • Programming: Testing of Code. Capturing Input from Files or from Users.

Week 4

  • Physics and Other Applications: Rockets Burns. Implementation of Final Project.
  • Programming: Implementation of Final Project. Capturing Program Output.