Game Development Reference
In-Depth Information
Every 2D Cartesian coordinate space has two straight lines that pass
through the origin. Each line is known as an axis and extends in-
finitely in two opposite directions. The two axes are perpendicular
to each other. (Actually, they don't have to be, but most of the co-
ordinate systems we will look at will have perpendicular axes.) The
two axes are analogous to Center and Division streets in Cartesia.
The grid lines in the diagram are analogous to the other streets in
Cartesia.
At this point it is important to highlight a few significant differences
between Cartesia and an abstract mathematical 2D space:
The city of Cartesia has o cial city limits. Land outside of the city
limits is not considered part of Cartesia. A 2D coordinate space,
however, extends infinitely. Even though we usually concern ourselves
with only a small area within the plane defined by the coordinate
space, in theory this plane is boundless. Also, the roads in Cartesia
go only a certain distance (perhaps to the city limits) and then they
stop. In contrast, our axes and grid lines extend potentially infinitely
in two directions.
In Cartesia, the roads have thickness. In contrast, lines in an abstract
coordinate space have location and (possibly infinite) length, but no
real thickness.
In Cartesia, you can drive only on the roads. In an abstract coordinate
space, every point in the plane of the coordinate space is part of the
coordinate space, not just the “roads.” The grid lines are drawn only
for reference.
In Figure 1.5, the horizontal axis is called the x-axis, with positive x
pointing to the right, and the vertical axis is the y-axis, with positive y
pointing up. This is the customary orientation for the axes in a diagram.
Note that “horizontal” and “vertical” are terms that are inappropriate for
many 2D spaces that arise in practice. For example, imagine the coordinate
space on top of a desk. Both axes are “horizontal,” and neither axis is really
“vertical.”
The city planners of Cartesia could have made Center Street run north-
south instead of east-west. Or they could have oriented it at a completely
arbitrary angle. For example, Long Island, New York, is reminiscent of
Cartesia, where for convenience the “streets” (1st Street, 2nd Street etc.)
run across the island, and the “avenues” (1st Avenue, 2nd Avenue, etc.)
run along its long axis. The geographic orientation of the long axis of the
island is an arbitrary result of nature. In the same way, we are free to orient
our axes in any way that is convenient to us. We must also decide for each
Search WWH ::




Custom Search