Get the inverse matrix
i know that i can get the inverse matrix by:
Inverse = - Accompany / Determinant;
but it''s really slow.
Is there a fast version to get the inverse matrix. Thanks!
The inverse of a (3x3) roatation matrix is just the transpose.
The inverse of a scale matrix scale factors x, y, z is another scale matrix with sf''s 1/x, 1/y, 1/z.
The inverse of a product of two matrices A*B is inv B * inv A.
The above facts can be used to get the inverse matrix much easier if you know your matrices are just scales and rotations.
Hope that helps...
I''ve never heard of "Accompany" as a term for the Adjoint before... was that a typo or is it another name?
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
The inverse of a scale matrix scale factors x, y, z is another scale matrix with sf''s 1/x, 1/y, 1/z.
The inverse of a product of two matrices A*B is inv B * inv A.
The above facts can be used to get the inverse matrix much easier if you know your matrices are just scales and rotations.
Hope that helps...
I''ve never heard of "Accompany" as a term for the Adjoint before... was that a typo or is it another name?
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
December 16, 2002 08:47 AM
There is the Gauss-Jordan reduction algorithm you can find at http://www.ma.man.ac.uk/~peter/MT1212/mt1212.html.
Fil (il genio)
Fil (il genio)
I wouldn''t recommend Gauss-Jordan for matrices of small size (3x3 or 4x4), just expand the adjoint / determinant form by hand. It''s good for large matrices though. You have to apply Gauss-Jordan to the identity at the same time and hence need a lot of storage, unless you remember what elementary row / column ops you do and apply them at the end.
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
Oh, sorry. A is for adjoint, not accompany. i made a mistake.
Thank you for your help.
Thank you for your help.
quote:
Original post by radio
Oh, sorry. A is for adjoint, not accompany. i made a mistake.
Thank you for your help.
Inverse = -Adjoint / Determinant ???
I think you''ve made another mistake. The adjoint of the matrix of cofactors maybe.
I''ve tried both methods today. The result is that the Gauss version is about 3 times slower than the other version.
I call the function 99999 times and the result is:
Gauss version: about 525ms
the other version: about 125ms
and all the result is correct.
Does this mean that Gauss-Jordan is not suitable for 3x3 and 4x4 matrices?
I call the function 99999 times and the result is:
Gauss version: about 525ms
the other version: about 125ms
and all the result is correct.
Does this mean that Gauss-Jordan is not suitable for 3x3 and 4x4 matrices?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement