|
![](/i/fill.gif) |
"Rune S. Johansen" <run### [at] get2net dk> writes:
> Normally a matrix can transform
> an object so the point x can become
> P1, y can become P2, z can become
> P3 and the origin becomes P4.
> How can I do this thing backwards?
> I.e. P1 becomes x, P2 becomes y,
> P3 becomes z, and P4 becomes the
> origin. The way I tried it I only
> got a lot of divide by zero warnings.
In practice, the matrix keyword in povray divides into a
- a linear function given by the matrix entries Val00 to Val22
- a transformation given by Val30 to Val32
If you want to calculate the inverse function, you have to
- invert the 3x3 matrix Val00 to Val22
- take the negative of the vector Val30 to Val32
How to calculate a inverse matrix should be described in every
linear algebra book. Keep in mind, that not every matrix is
invertible.
I hope this helps
Thomas
--
http://www.fmi.uni-konstanz.de/~willhalm
Post a reply to this message
|
![](/i/fill.gif) |