3DWorld (7/13)

From:Thomas Frieden
Date:16 Sep 2001 at 14:12:47
Subject:Re: [3DWorld] Inverse matrix?

Hi,

Tim Hanson wrote:

>I know it`s not practicle to calculate the inverse of a matrix but I
need the
>inverse matrix every loop. Is there a way of keeping a running copy of the
>inverse? ie Every time I change the first matrix I change the inverse
so that
>it remains the inverse.
>
>
>I`ve run up against this problem before and have always used a hack
around to
>solve it but this time I cant see a solution so any help would be
apreciated.
>

It depends on the matrix. If it's a 3x3 matrix, this is quite easy to
invert. Just calculate the determinant (a 3x3 matrix has a relatively
simple determinant), and divide each elemtent by that.

If the matrix is a rotation matrix (no matter if it's 3x3 or 4x4), the
inverse is it's transpose, i.e. the matrix obtianed by swapping column
and row numbers, because a rotation matrix is orthonormal (all columns
are orthogonal, unit length vectors).

I'm not 100% sure about this: If you only use "normal" transformations,
like rotation, translation, and scale, it should be possible to keep an
inverse by applying the "negative" operations to the second matrix.

Regards,



Thomas Frieden
Senior Developer, Hyperion Entertainment
ThomasF@hyperion-entertainment.com
http://www.hyperion-entertainment.com