Game Development Reference
In-Depth Information
west of Division Street, and how far they are from Division Street. So we
have streets such as East 5th Street and West 22nd Street.
The naming convention used by the city planners of Cartesia may not
be creative, but it certainly is practical. Even without looking at the map,
it is easy to find the donut shop at North 4th and West 2nd. It's also easy
to determine how far you will have to drive when traveling from one place
to another. For example, to go from that donut shop at North 4th and
West 2nd, to the police station at South 3rd and Division, you would travel
seven blocks south and two blocks east.
1.2.2
Arbitrary 2D Coordinate Spaces
Before Cartesia was built, there was nothing but a large flat area of land.
The city planners arbitrarily decided where the center of town would be,
which direction to make the roads run, how far apart to space the roads, and
so forth. Much like the Cartesia city planners laid down the city streets, we
can establish a 2D Cartesian coordinate system anywhere we want—on a
piece of paper, a chessboard, a chalkboard, a slab of concrete, or a football
field.
Figure 1.5 shows a diagram of a 2D Cartesian coordinate system.
As illustrated in Figure 1.5, a 2D Cartesian coordinate space is defined
by two pieces of information:
Every 2D Cartesian coordinate space has a special location, called
the origin, which is the “center” of the coordinate system. The origin
is analogous to the center of the city in Cartesia.
Figure 1.5
A 2D Cartesian coordinate space
 
Search WWH ::




Custom Search