Game Development Reference
In-Depth Information
A vector has no concept of position . This means that two vectors are identical as
long as they have the same magnitude (or length) and point in the same direction.
Figure 3.1 illustrates a vector field that contains several vectors. All of the vectors
in this field have the same magnitude and direction, and therefore they are equi-
valent.
Figure 3.1 Vector field where all the vectors are equivalent.
This equality regardless of where the vectors are drawn is extremely valuable.
When solving vector problems, you'll find that it often helps if a vector is drawn
at a different location. Because changing where a vector is drawn does not change
the vector itself, this is a useful trick to keep in mind.
Even though where we draw a vector doesn't change its value, it simplifies things
if a vector is drawn such that the start, or tail , of the vector is at the origin (0, 0).
The arrow part of the vector (the head ) can then be thought as “pointing at” a spe-
cific position in space, which actually corresponds to the value of the vector. So if
the 2D vector 1, 2 is drawn with its tail at the origin, the head will point at the
position (1, 2). This is shown in Figure 3.2 .
Search WWH ::




Custom Search