
158 Chapter 9 The M athematics of Rotations
9.1 Rotating Objects in 2D
Before we look at rotations in three dimensions, it is worth understanding them in
two. I will not implement any code from this section, but thinking about the 2D case
is a good first step toward understanding three dimensions.
In two dimensions, we can represent any object’s configuration in space by its 2D
position and an angle that shows how it is oriented. Just as the position is specified
relative to some fixed origin point, the angle is also given relative to a predetermined
direction. Figure 9.1 illustrates this.
If the object is rotating, its orientation will change over