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:02:58 EDT (-0400)
 Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates
 From: kurtz le pirate Date: 10 Sep 2022 11:37:30 Message: <631caf3a\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#631caf3a%241%40news.povray.org",
"headline": "Re: Convert 313 Cartesian Euler Angles to POV-Ray Coordinates",
"dateCreated": "2022-09-10T15:37:30+00:00",
"datePublished": "2022-09-10T15:37:30+00:00",
"author": {
"@type": "Person",
"name": "kurtz le pirate"
}
}
On 10/09/2022 17:16, LAP wrote:
>
> 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.

all tranformations are just **matrix operations**

for scaling :
| scaleX  0        0      0 |
MSc = | 0       scaleY   0      0 |
| 0       0       scaleZ  0 |
| 0       0       0       0 |

scaling point : MSc.pt

for translating :
| 1 0 0 dx |
MTr = | 0 1 0 dy |
| 0 0 1 dz |
| 0 0 0 1  |

translate : MTr.pt
(in povray matrix, the last line)

and, of corse, 'pt' is **also* a matrix

| x |
pt = | y |
| z |
| 1 ]

and the order of application of the transformations is important !

--
Kurtz le pirate
Compagnie de la Banquise
```