Game Development Reference
In-Depth Information
We can actually create bad data due to floating point round off error.
For example, suppose we apply a large number of incremental changes
to an orientation, which could routinely happen in a game or simu-
lation that allows a human to interactively control the orientation
of an object. The large number of matrix multiplications, which are
subject to limited floating point precision, can result in an ill-formed
matrix. This phenomenon is known as matrix creep. We can combat
matrix creep by orthogonalizing the matrix, as we already discussed
in Section 6.3.3.
8.2.5
Summary of Matrix Form
Let's summarize what Section 8.2 has said about matrices.
Matrices are a “brute force” method of expressing orientation: we
explicitly list the basis vectors of one space in the coordinates of
some different space.
The term direction cosines matrix alludes to the fact that each ele-
ment in a rotation matrix is equal to the dot product of one input
basis vector with one output basis vector. Like all transformation
matrices, the rows of the matrix are the output-space coordinates of
the input-space basis vectors. Furthermore, the columns of a rota-
tion matrix are the input-space coordinates of the output-space basis
vectors, a fact that is only true by virtue of the orthogonality of a
rotation matrix.
The matrix form of representing orientation is useful primarily be-
cause it allows us to rotate vectors between coordinate spaces.
Modern graphics APIs express orientation by using matrices.
We can use matrix multiplication to collapse matrices for nested co-
ordinate spaces into a single matrix.
Matrix inversion provides a mechanism for determining the “oppo-
site” angular displacement.
Matrices can take two to three times as much memory as other tech-
niques. This can become significant when storing large numbers of
orientations, such as animation data.
Search WWH ::




Custom Search