Game Development Reference
In-Depth Information
Figure 2.6. Locating points versus specifying vectors
2.4
Vectors versus Points
Recall that a “point” has a location but no real size or thickness. In this
chapter, we have learned how a “vector” has magnitude and direction, but
no position. So “points” and “vectors” have different purposes, conceptu-
ally: a “point” specifies a position, and a “vector” specifies a displacement.
But now examine Figure 2.6, which compares an illustration from Chap-
ter 1 (Figure 1.8), showing how 2D points are located, with a figure from
earlier in this chapter (Figure 2.3) , showing how 2D vectors are specified. It
seems that there is a strong relationship between points and vectors. This
section examines this important relationship.
2.4.1
Relative Position
Section 2.2 discussed the fact that because vectors can describe displace-
ments, they can describe relative positions. The idea of a relative position
is fairly straightforward: the position of something is specified by describing
where it is in relation to some other, known location.
This begs the questions: Where are these “known” locations? What is
an “absolute” position? It is surprising to realize that there is no such thing!
Every attempt to describe a position requires that we describe it relative
to something else. Any description of a position is meaningful only in
the context of some (typically “larger”) reference frame. Theoretically, we
could establish a reference frame encompassing everything in existence and
select a point to be the “origin” of this space, thus defining the “absolute”
coordinate space. However, even if such an absolute coordinate space were
possible, it would not be practical. Luckily for us, absolute positions in
 
Search WWH ::




Custom Search