Where the adjoint matrix and det the determinant
VII.5 FAST MATRIX INVERSION
typical graphics program usually performs many more matrix multiplica-tions than inversions so lazy evaluation gives better overall system perfor-mance. The following two sections describe additional special-case inversion techniques for use with lazy evaluation that complement the ones in the preceding section.
0 | 0 | 0 |
|
|
= | 1 sx |
0 | 0 | 0 | , sx, sy, sz ≠ 0. | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sy | 0 | 0 | ||||||||||||
0 | 0 | |||||||||||||
|
||||||||||||||
|
0 | sz | 0 | 0 | ||||||||||
0 | ||||||||||||||
|
ty | tz | 1 | −tx sx | −ty | 1 | ||||||||
sy |
Inverse of an Affine Matrix
M | | −1 | = | | −B | −1CA |
|
348 | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
GRAPHICS GEMS II Edited by JAMES ARVO |
M |
|
|
| −1 | = | |
---|
The effort required to calculate the inverse of the 3 ⋅ 3 matrix A is much less than that for a general 4 ⋅ 4 matrix.
One method for finding the inverse of a general matrix involves deter-minants as described in a previous gem (Carling, 1990): A-1 = A*/det(A), where A* is the adjoint matrix of A and det(A) is the determinant of A. If the dimension of A is n, the number of multiplica-tions for this method is �((n + 1)!)for large n.