Game Development Reference
In-Depth Information
the best of all possible worlds, he would deliver a map oriented as shown
in the top-left rectangle, with north pointing to the top of the
page and east to the right, which is what people usually expect. A subcom-
mittee
formed
for
the
task
decided
to
name
this
the
normal
orientation.
After the meeting had lasted a few hours and tempers were beginning
to fray, it was decided that the other three variants shown in the top row of
Figure 1.7 were probably acceptable too, because they could be transformed
to the normal orientation by placing a pin in the center of the page and
rotating the map around the pin. (You can do this, too, by placing this
book flat on a table and turning it.) Many hours were wasted by tired
functionaries putting pins into various places in the maps shown in the
second row of Figure 1.7, but no matter how fast they twirled them, they
couldn't seem to transform them to the normal orientation. It wasn't until
everybody important had given up and gone home that a tired intern,
assigned to clean up the used coffee cups, noticed that the maps in the
second row can be transformed into the normal orientation by holding them
up against a light and viewing them from the back. (You can do this, too,
by holding Figure 1.7 up to the light and viewing it from the back—you'll
have to turn it, too, of course.) The writing was backwards too, but it was
decided that if Leonardo da Vinci (1452-1519) could handle backwards
writing in 15th century, then the citizens of Cartesia, though by no means
his intellectual equivalent (probably due to daytime TV), could probably
handle it in the 21st century.
In summary, no matter what orientation we choose for the x- and y-
axes, we can always rotate the coordinate space around so that +x points to
our right and +y points up. For our example of screen-space coordinates,
imagine turning the coordinate system upside down and looking at the
screen from behind the monitor. In any case, these rotations do not distort
the original shape of the coordinate system (even though we may be looking
at it upside down or reversed). So in one particular sense, all 2D coordinate
systems are “equal.” In Section 1.3.3, we discover the surprising fact that
this is not the case in 3D.
1.2.3
Specifying Locations in 2D Using Cartesian Coordinates
A coordinate space is a framework for specifying location precisely. A
gentleman of Cartesia could, if he wished to tell his lady love where to
meet him for dinner, for example, consult the map in Figure 1.4 and say,
“Meet you at the corner of East 2nd Street and North 4th Street.” Notice
that he specifies two coordinates, one in the horizontal dimension (East 2nd
Street, listed along the top of the map in Figure 1.4) and one in the vertical
dimension (North 4th Street, listed along the left of the map). If he wished
 
Search WWH ::




Custom Search