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 Time21 Apr 2024 04:27:50 EDT (-0400)
 Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates
 From: LAP Date: 10 Sep 2022 11:20:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.631caa527d53bcda80f7e38f24a1f89d%40news.povray.org",
"headline": "Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates",
"dateCreated": "2022-09-10T15:20:00+00:00",
"datePublished": "2022-09-10T15:20:00+00:00",
"author": {
"@type": "Person",
"name": "LAP"
}
}
kurtz le pirate <kur### [at] gmailcom> wrote:
>
>  | a b c |     < a, b, c,            < a, d, g,
>  | d e f | -->   d, e, f,  -- or -->   b, e, h,
>  | g h i |       g, h, i,              c, f, i,
>                  0, 0, 0 >             0, 0, 0,>
>

Yes, but the orginal matrix is in Cartesian coordinates [x, y, z].

The POV Ray matrix operates on its own [x,y,z] coordinates which would be
equivalent to the Cartesian [y, z, -x].

Thus, the matrix needs to be changed to:

< d , g, -a,
e,  h, -b,
f,  i, -c,
0,  0,  0 >

So far this seems to work.

Another part of my problem was that I was also using POV Ray scaling and
translate commands which seem to really mess up the rotations.

From now on I will scale and translate with an external script and just use POV
Ray to rotate.  I can also translate with the POV Ray rotation matrix without
distortion because it is a part of the transformation.
```