To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.rayOpen lugnet.cad.ray in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Ray-Tracing / 2769
2768  |  2770
Subject: 
Inverse matrix?
Newsgroups: 
lugnet.cad.ray, lugnet.cad
Date: 
Sat, 7 Apr 2007 18:28:20 GMT
Viewed: 
6599 times
  
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.

I know POV-Ray 3.6 has an inverse matrix function but it doesn't work in 3.1,
which is what I'm using.



Message has 3 Replies:
  Re: Inverse matrix?
 
(...) 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) (17 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
  Re: Inverse matrix?
 
(...) 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 (...) (17 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
  Re: Inverse matrix?
 
(...) 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 (17 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)

13 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