i
i
i
i
i
i
i
i
2.4. Vectors 27
origin location o. The global model is typically stored in this canonical coordinate
system, and it is thus often called the global coordinate system.However,ifwe
want to use another coordinate system with origin p and orthonormal basisvectors
u, v,andw,thenwedo store those vectors explicitly. Such a system is called
a frame of reference or coordinate frame. For example, in a flight simulator, we
might want to maintain a coordinate system with the origin at the nose of the
plane, and the orthonormal basis aligned with the airplane. Simultaneously, we
would have the master canonical coordinate system (Figure 2.21). The coordinate
system associated with a particular object, such as the plane, is usually called a
local coordinate system.
At a low level, the local frame is stored in canonical coordinates. For example,
if u has coordinates (x
u
,y
u
,z
u
),
u = x
u
x + y
u
y + z
u
z.
A location implicitly includes an offset from the canonical origin:
p = o + x
p
x + y
p
y + z
p
z,
where (x
p
,y
p
,z
p
) are the coordinates of p.
Note that if we store a vector a with respect to the u-v-w frame, we store a
triple (u
a
,v
a
,w
a
) which we can interpret geometrically as
a = u
a
u + v
a
v + w
a
w.
To get the canonical coordinates of a vector a stored in the u-v-w coordinate
system, simply recall that u, v,andw are themselves stored in terms of Cartesian
coordinates, so the expression u
a
u + v
a
v + w
a
w is already in Cartesian coordi-
nates if evaluated explicitly. To get the u-v -w coordinates of a vector b stored in
the canonical coordinate system, we can use dot products:
u
b
= u · b; v
b
= v · b; w
b
= w · b
This works because we know that for some u
b
, v
b
,andw
b
,
u
b
u + v
b
v + w
b
w = b,
and the dot product isolates the u
b
coordinate:
u · b = u
b
(u · u)+v
b
(u · v)+w
b
(u · w)
= u
b
This works because u, v,andw are orthonormal.
Using matrices to manage changes of coordinate systems is discussed in Sec-
tions 6.2.1 and 6.5.