Game Development Reference
In-Depth Information
the universe aren't important. Do you know your precise position in the
universe right now? We don't know ours, either. 3
2.4.2
The Relationship between Points and Vectors
Vectors are used to describe displacements, and therefore they can describe
relative positions. Points are used to specify positions. But we have just
established in Section 2.4.1 that any method of specifying a position must
be relative. Therefore, we must conclude that points are relative as well—
they are relative to the origin of the coordinate system used to specify their
coordinates. This leads us to the relationship between points and vectors.
Figure 2.7 illustrates how the point (x,y) is related to the vector [x,y],
given arbitrary values for x and y.
As you can see, if we start
at the origin and move by the
amount specified by the vector
[x,y], we will end up at the lo-
cation described by the point
(x,y). Another way of say-
ing this is that the vector [x,y]
gives the displacement from the
origin to the point (x,y).
This may seem obvious, but
it is important to understand
that points and vectors are con-
ceptually distinct, but mathe-
matically equivalent. This con-
fusion between “points” and
“vectors” can be a stumbling
block for beginners, but it
needn't be a problem for you.
When you think of a location, think of a point and visualize a dot. When
you think of a displacement, think of a vector and visualize an arrow.
In many cases, displacements are from the origin, and so the distinction
between points and vectors will be a fine one. However, we often deal with
quantities that are not relative to the origin, or any other point for that
matter. In these cases, it is important to visualize these quantities as an
arrow rather than a point.
The math we develop in the following sections operates on “vectors”
rather than “points.” Keep in mind that any point can be represented as
a vector from the origin.
Figure 2.7
The relationship between points and vectors
3 But we do know our position relative to the nearest Taco Bell.
Search WWH ::




Custom Search