POV-Ray : Newsgroups : povray.general : Convert 313 Cartesian Euler Angles to POV-Ray Coordinates : Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates Server Time
19 Apr 2024 08:06:28 EDT (-0400)
  Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates  
From: Tor Olav Kristensen
Date: 20 Sep 2022 11:10:00
Message: <web.6329d5a27d53bcda92b7f9e689db30a9@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > > "LAP" <nomail@nomail> wrote:
> > > > ...

> > > > Since the basic coordinate transform is <x,y,z> Euclidean to <-z, x, y> I have
> > > > tried to rearrange the components of the Euclidean 313 rotation matrix to
> > > > duplicate this transform but the results are not correct.
> > > > ...

> ...
> I have no idea what you mean by this:
> "Since the basic coordinate transform is <x,y,z> Euclidean to <-z, x, y> ..."
> ...

Now I think that I understand what you are on about here.
POV-Ray's rendering of your model relative to your screen (depth into or out
of the screen, left or right on the screen and up or down on the screen) is
probably not the same as your other software (or your mind) does it.

If so, I recommend that you do not rearrange components in the rotation matrix
or in position vectors for body parts, but instead change POV-Ray's camera
vectors.

If you want the camera's vectors to be aligned with POV-Ray's x, y and z axes,
you can use any of these camera vector combinations and still keep the left
handedness of POV-Ray:

(D: direction, R: right, U: up)

D: +x, R: +y, U: +z
D: +x, R: -z, U: +y
D: +x, R: -y, U: -z
D: +x, R: +z, U: -y

D: -x, R: +y, U: -z
D: -x, R: -z, U: -y
D: -x, R: -y, U: +z
D: -x, R: +z, U: +y

D: +y, R: +z, U: +x
D: +y, R: -x, U: +z
D: +y, R: -z, U: -x
D: +y, R: +x, U: -z

D: -y, R: +z, U: -x
D: -y, R: -x, U: -z
D: -y, R: -z, U: +x
D: -y, R: +x, U: +z

D: +z, R: +x, U: +y
D: +z, R: -y, U: +x
D: +z, R: -x, U: -y
D: +z, R: +y, U: -x

D: -z, R: +z, U: -y
D: -z, R: -y, U: -x
D: -z, R: -x, U: +y
D: -z, R: +y, U: +x

Example:

    camera {
        direction +z
        right +x // or +4/3*x for the default aspect ratio
        up +y
    }

If you want to switch to a right handed camera, you can use any of these camera
vector combinations:

D: +x, R: +y, U: -z
D: +x, R: -z, U: -y
D: +x, R: -y, U: +z
D: +x, R: +z, U: +y

D: -x, R: +y, U: +z
D: -x, R: -z, U: +y
D: -x, R: -y, U: -z
D: -x, R: +z, U: -y

D: +y, R: +z, U: -x
D: +y, R: -x, U: -z
D: +y, R: -z, U: +x
D: +y, R: +x, U: +z

D: -y, R: +z, U: +x
D: -y, R: -x, U: +z
D: -y, R: -z, U: -x
D: -y, R: +x, U: -z

D: +z, R: +x, U: -y
D: +z, R: -y, U: -x
D: +z, R: -x, U: +y
D: +z, R: +y, U: +x

D: -z, R: +z, U: +y
D: -z, R: -y, U: +x
D: -z, R: -x, U: -y
D: -z, R: +y, U: -x

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

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