Graphics Reference
In-Depth Information
14.5.3
Aligning EC and WC Orthonormal Basis
In interactive computer graphics applications, the camera position, look-at posi-
tion, and up vector are always defined in the WC space. For this reason, the EC
orthonormal basis is always defined with respect to the WC space. The WC space
is defined based on the basic Cartesian coordinate frame, or
V x
=(
1
,
0
,
0
) ,
V y
WC orthonormal basis:
=(
0
,
1
,
0
) ,
V z
=(
0
,
0
,
1
) .
As discussed in Section B.4, with the EC orthonormal basis as defined in Equa-
tion (14.3), the transformation matrix M wb 2 eb ,
wb2eb. wb2eb abbreviates
world basis to eye basis .
x w
x u
x v
0
,
y w
y u
y v
0
M wb 2 eb =
z w
z v 0
00 0 1
z u
aligns the EC orthonormal basis with that of WC, where V w points in the V x
direction, V u in the V y direction, and V v in the V z direction. Because M wb 2 eb is an
orthonormal matrix, in this case, the EC-to-WC orthonormal basis transformation
is
x w
y w
z w
0
.
x u
y u
z u
0
M 1
wb 2 eb
M eb 2 wb =
=
x v
y v
z v
0
0
0
0
1
Figure 14.18. The im-
age generated by the cam-
era from Figure 14.19.
14.5.4
The WC-to-EC Transform
With the understanding of EC space, we are now ready to examine the actual WC-
to-EC transform. Notice that in the EC orthonormal basis (Equation (14.3)), the
view vector V v points from the camera toward the look-at position, whereas in
the EC space, the viewing direction is defined to be looking toward the negative
z -axis. This means that when aligning the EC orthonormal basis with EC space,
V v should be aligned with the negative z -axis.
Search WWH ::




Custom Search