Subject:
|
Re: Another matrix inverse question
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Tue, 10 Apr 2007 19:39:13 GMT
|
Viewed:
|
2170 times
|
| |
 | |
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
|
|
Message has 2 Replies:  | | Re: Another matrix inverse question
|
| (...) I can see the advantages of swapping the off-diagonals for inverting the rotation(s), but that still leaves the question of how to invert translations. In a current example I'm looking at, a minifig hand, the hand is rotated 45 degrees, (...) (18 years ago, 11-Apr-07, to lugnet.cad)
|  | | Re: Another matrix inverse question
|
| (...) 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 (...) (18 years ago, 11-Apr-07, to lugnet.cad)
|
Message is in Reply To:
 | | Re: Another matrix inverse question
|
| 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 (...) (18 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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|