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 Time28 Jan 2023 14:31:04 EST (-0500)
 Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates
 From: jr Date: 9 Sep 2022 13:05:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.631b71987d53bcdaecf5a77b6cde94f1%40news.povray.org",
"headline": "Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates",
"dateCreated": "2022-09-09T17:05:00+00:00",
"datePublished": "2022-09-09T17:05:00+00:00",
"author": {
"@type": "Person",
"name": "jr"
}
}
hi,

"LAP" <nomail@nomail> wrote:
> >
> > Given a rotation matrix in 3D Euclidean space:
> >
> > | 00 01 02 |
> > | 10 11 12 |
> > | 20 21 22 |
> >
> > What is the correct way of transforming this matrix so that it will rotate a
> > POV-Ray object in the same way?

my maths is .. non-existent, so cannot answer the question.  however, POV-Ray
applies rotations in axis order, so, if you can convert your matrix to x,y,z
angles, you should be able to use three separate consecutive rotations.

"The order of the rotations does matter. Rotations occur about the x-axis first,
then the y-axis, then the z-axis. If you are not sure if this is what you want
then you should only rotate on one axis at a time using multiple rotation
statements to get a correct rotation."
<https://wiki.povray.org/content/Reference:Transformations#Rotate>

regards, jr.
```