| | Inverse matrix? James Reynolds
| | | Does anyone know how to generate an inverse matrix. By inverse I mean it will undo the rotation of the original matrix. I thought the inverse of <1,0,0,0,1,0,0,0,1,0,0,0> was <-1,0,0,0,-1,0,0,0,-1,0,0,0>. In other words, multiply every value by -1. (...) (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | Re: Inverse matrix? Timothy Gould
| | | | | (...) The inverse of <1,0,0,0,1,0,0,0,1,0,0,0> is itself. To compute the inverse of a general 3x3 matrix (essentially what you need to do) is rather complicated. You could do it in a macro using Gaussian elimination [1]. Tim [1] (URL) (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | Re: Inverse matrix? James Reynolds
| | | | | | (...) Arg. I thought this was going to be easy. I liked this part of the wikipedia article: "In practice, inverting a matrix is rarely required. Most of the time, one is really after the solution of a particular system of linear equations." Hm. I (...) (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | | | Re: Inverse matrix? James Reynolds
| | | | | | Clarification! .... snip (...) I am using additional points to specify the location of feet. Combined with the model location, I have 3 points for the hip and feet. [now the following paragraph should make more sense] (...) (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | | | Re: Inverse matrix? Timothy Gould
| | | | | | (...) Just take the transpose of the 3x3 world rotation matrix and it should work as the inverse. Transpose means swap diagonals M[1,2] <=> M[2,1] etc. If this doesn't work I've misunderstood you. Tim (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | | | Re: Inverse matrix? Timothy Gould
| | | | | | (...) I mean swap the OFF-diagonals, leave the diagonals as is. (...) (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | | | Re: Inverse matrix? James Reynolds
| | | | | | (...) I learned my matrix math from a 3d game programming book and I have no idea what the diagonals are... I was going to look it up but I got Travis' code to work! (URL) might still look it up as I may need to know about it) James (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | | | Re: Inverse matrix? James Reynolds
| | | | | | (...) Did you mean this: [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ] [ 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16 ] I have yet to try it. James (18 years ago, 8-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | | | Re: Inverse matrix? James Reynolds
| | | | | | (...) Well I'll be! That works too! Thanks you guys! James (18 years ago, 8-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | | | Re: Inverse matrix? James Reynolds
| | | | | | The latest: (URL) (18 years ago, 8-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | Re: Inverse matrix? Travis Cobbs
| | | | | (...) There really is no easy way to do it. Feel free to look at TCVector::invertMatrix in the LDView code if you want to see code that does it on a 4x4 matrix. To convert a 3x3 matrix into a 4x4 matrix, put the 3x3 in the top left, put a 1 in the (...) (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | | Re: Inverse matrix? James Reynolds
| | | | | | (...) Hehehe, cool, I'll try that. Thanks! James (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | | | | | | Re: Inverse matrix? Timothy Gould
| | | | | (...) I just realised something... do you want a general inverse or a specific inverse? Some inversions are simple eg. a pure rotation can be inverted by taking its transpose and reflections are their own inverses. Tim (18 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | | | | | |