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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.