To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 14558
14557  |  14559
Subject: 
Re: Another matrix inverse question
Newsgroups: 
lugnet.cad
Date: 
Wed, 11 Apr 2007 12:11:01 GMT
Viewed: 
1841 times
  
In lugnet.cad, Timothy Gould wrote:
In lugnet.cad, Brian Durney wrote:
Thanks for the information, everyone.  Although the test case I posted was
arbitrary, I did some other tests with matrices that were used for rotations and
translations.  The upper-left 3x3 seemed to be OK, but the bottom row had
problems.  I'm guessing that the inversion routine wasn't written to include
those.

I wanted the inverse so that I could move a part back to the origin and do
rotations in the local coordinate space.  I think that what I will do is keep an
inverse matrix with the transformation matrix, and every time I do a
transformation (like rotate 45 degrees around the X axis) I will do the inverse
(-45 degrees) and apply it to the inverse matrix.

I suppose another possibility is to transform the origin and/or axis of rotation
and then use quaternions to specify rotation around a point other than the
origin, but it seems like that would have more opportunities for mistakes,
considering my limited experience with quaternions.

Thanks again for the help.
Brian Durney

Quarternions are, IMO, a bad way to do what matrices do well.

For a rotation you don't need to (and shouldn't) calculate the inverse by a
routine. Just transpose (swap the off-diagonals) and you have the inverse.
There's no point running unneccessay numerical risks.

Tim

Som further clarification... I was back in the 3x3 matrix world when I wrote
this: the true inverse of a rotation + translate in psuedo-4x4 notation is as
follow

[ R11 R12 R13 x
  R21 R22 R23 y
  R31 R32 R33 z
   0   0   0  1 ]

goes to

[ R11 R21 R31 xp
  R12 R22 R32 yp
  R13 R23 R33 zp
   0   0   0  1 ]

where xp = -(R11 x + R21 y + R31 z), yp = -(R12 x + R22 y + R32 z), zp = -(R13 x
+ R23 y + R33 z)

Tim



Message is in Reply To:
  Re: Another matrix inverse question
 
(...) Quarternions are, IMO, a bad way to do what matrices do well. For a rotation you don't need to (and shouldn't) calculate the inverse by a routine. Just transpose (swap the off-diagonals) and you have the inverse. There's no point running (...) (17 years ago, 10-Apr-07, to lugnet.cad)

12 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR