|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rune wrote:
>
> "Francois Labreque" wrote:
> > [A][B] = [C]
> >
> > Premultiply both sides by the inverse of [A]
>
> You've lost me. Too tricky for me.
Hello Rune
Back in March i made some POV-macros
that do matrix calculations on 3x3
matrices stored in POV-arrays.
If you have a look at these two posts:
news://news.povray.org/38CCE1C6.4947A712%40hotmail.com
news://news.povray.org/38CEBC39.582A511F%40online.no
(My thread "Different error messages for same POV-file")
then maybe you are able to see how to find
the inverse of a matrix with POV-script.
(Look at the Minv macro.)
I think that I also have some newer code
that does the same (and maybe more) if
you are interested.
Best regards,
Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Josh English" wrote:
> Silly me, I already solved the problem of how to find the inverse
> of a matrix to deal with a collision model for POV-Ray wth the
> help of a friend
Thank you very much!
To be honest I don't understand any of it, but it seems to work very well.
To really understand it I'd have to learn about matrixes all from the
beginning. I haven't learned about it in school, and I've not been able to
find a place on the net that describes it thoroughly enough.
But it works anyway... :)
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Warp" wrote:
> Just calculate the inverse matrix of A and then multiply A*C
> (matrix multiplication, not item-by-item multiplication) and
> you'll get B.
Thanks for your help.
If I've understood it correctly, to multiply matrixes in POV-Ray I can
simply apply both matrixes to the object (first A, then C), right?
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Francois Labreque" wrote:
> [A][B] = [C]
>
> [B] = [A-1][C]
Thanks for your help.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3a43dbf0@news.povray.org>, "Rune" <run### [at] inamecom>
wrote:
> If I've understood it correctly, to multiply matrixes in POV-Ray I can
> simply apply both matrixes to the object (first A, then C), right?
Depends on what you want to do...matrices are multiplied together to
concatenate the transforms, but you won't be able to retrieve the
matrix. And if you really only want to manipulate objects or vectors,
and don't care about the matrices themselves, MegaPOV allows you to
transform vectors and use inverse transformations without needing any
macros.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Chris Huff" wrote:
> "Rune" wrote:
>
> > If I've understood it correctly, to multiply matrixes in
> > POV-Ray I can simply apply both matrixes to the object
> > (first A, then C), right?
>
> Depends on what you want to do...matrices are multiplied
> together to concatenate the transforms, but you won't be
> able to retrieve the matrix.
I haven't figured it all out yet, but I *think* I won't need the matrix
itself.
> And if you really only want to manipulate objects or
> vectors, and don't care about the matrices themselves,
> MegaPOV allows you to transform vectors and use inverse
> transformations without needing any macros.
Uh, clever!
Erm, hehe, I guess that means I don't need the inverse matrix macro after
all...
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated December 17)
/ Also visit http://www.povrayusers.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker <ron### [at] povrayorg> wrote:
: They're not really. The fourth column is just a convenient way of specifying
: the translate component. You could easily take that out, invert, and put
: it back.
But aren't the rays also translated with the inverse translation of the
object? Isn't the whole 4x4 matrix inverted?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24 Dec 2000 12:17:09 -0500, Warp wrote:
>Ron Parker <ron### [at] povrayorg> wrote:
>: They're not really. The fourth column is just a convenient way of specifying
>: the translate component. You could easily take that out, invert, and put
>: it back.
>
> But aren't the rays also translated with the inverse translation of the
>object? Isn't the whole 4x4 matrix inverted?
Yes, but it's easiest to invert the 3x3 matrix and then tack on the inverse
translation than to try to invert the whole thing.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker <ron### [at] povrayorg> wrote:
: Yes, but it's easiest to invert the 3x3 matrix and then tack on the inverse
: translation than to try to invert the whole thing.
But would inverting the whole 4x4 matrix work as well?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24 Dec 2000 13:22:46 -0500, Warp wrote:
>Ron Parker <ron### [at] povrayorg> wrote:
>: Yes, but it's easiest to invert the 3x3 matrix and then tack on the inverse
>: translation than to try to invert the whole thing.
>
> But would inverting the whole 4x4 matrix work as well?
Of course.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |