POV-Ray : Newsgroups : povray.general : handedness - affected by transforms? Server Time
28 Nov 2024 12:54:42 EST (-0500)
  handedness - affected by transforms? (Message 1 to 4 of 4)  
From: Paco
Subject: handedness - affected by transforms?
Date: 29 Dec 2006 16:30:00
Message: <web.459582a7b9760bf9e43211920@news.povray.org>
I'm trying to manipulate the camera from an external program by means of an
INI file. The external program is right-handed and I originally manipulated
the camera by means of a series of rotations and translations -everything
worked fine. Now i'm trying manipulate the camera using the matrix
transform. in my case the transform is:

matrix <  matrix00  ,  matrix10  , -matrix20,
          matrix01  ,  matrix11  , -matrix21,
         -matrix02  , -matrix12  , +matrix22,
          matrix03  ,  matrix13  , -matrix23    >

matrixIJ is the element in row I column J of my original matrix which
transforms points like p'=M.p, and the sign changes are to transform the
pov coords to right handed (z'=-z) , transform the point, then change it to
left-handed.

It doesn't work for some situations, and I'm wondering if it is something to
do with POV's internal idea of handedness. I know that if I set the right
vector to say <-1,0,0> it will assume a left handed system. What happens
with a transformation though?

Does POV change to left-handed only if the right vector is explicitly set
with a -ve x coord, or can transformations alter it as well? Does anyone
know the exact way it's determined?


Post a reply to this message

From: Slime
Subject: Re: handedness - affected by transforms?
Date: 29 Dec 2006 16:44:12
Message: <45958c2c@news.povray.org>
I'm willing to bet that the handedness will be changed when the matrix's
determinant is negative. (That is, the 3x3 matrix you get when ignoring the
last row.)

In other words, yes, it should be possible to change the handedness with a
matrix transform, if the matrix turns the camera "inside out" much like
"right -x" does.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Paco
Subject: Re: handedness - affected by transforms?
Date: 29 Dec 2006 16:55:01
Message: <web.45958e419ef9ca71e43211920@news.povray.org>
Is there a way to force POV to remain left handed?


Post a reply to this message

From: Alain
Subject: Re: handedness - affected by transforms?
Date: 29 Dec 2006 22:04:58
Message: <4595d75a@news.povray.org>
Paco nous apporta ses lumieres en ce 29-12-2006 16:53:
> Is there a way to force POV to remain left handed?

Make sure that the right vector of the camera stays positive.

-- 
Alain
-------------------------------------------------
Politicians are like socks - they smell bad and should be changed often.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.