10.2 Introduction

Have you ever witnessed a lunar eclipse? The resulting images of a shadowed moon with changes in color and brightness cause us to ask questions about the details of this uncommon occurrence. We learned in science class that this fascinating celestial event is caused by the relative motion of the Earth, sun, and moon as they orbit around one another. Early astronomers such as Ptolemy and Copernicus built elaborate models of the planets to show their relative positions or sizes. These models were constructed so that the motion of the planets in the model matched the motion of the planets in the night sky.

In this chapter, we take up the task of building a different type of planetary model: a software model. Our model will consist ...

Get Python Programming in Context, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.