POV-Ray : Newsgroups : povray.advanced-users : Get Euler angles from unit vector? : Re: Get Euler angles from unit vector? Server Time
29 Apr 2024 13:41:57 EDT (-0400)
  Re: Get Euler angles from unit vector?  
From: Mike Horvath
Date: 28 Sep 2018 00:36:03
Message: <5badafb3$1@news.povray.org>
Awesome, thanks!



On 9/28/2018 12:27 AM, clipka wrote:
> Am 28.09.2018 um 03:27 schrieb Mike Horvath:
>> Two important questions I have (that may not be explained in the docs),
>> is how to convert a 3x3 rotation matrix to POV-Ray syntax, and how to
>> determine the inverse matrix?
> 
> given a matrix
> 
>       / a  b  c \
>      (  d  e  f  )
>       \ g  h  i /
> 
> you have to specify either
> 
>      matrix < a, b, c,
>               d, e, f,
>               g, h, i,
>               0, 0, 0 >
> 
> or
>      matrix < a, d, g,
>               b, e, h,
>               c, f, i,
>               0, 0, 0 >
> 
> The order depends on whether the original matrix is specified in
> "mathematical" or "computer graphics" style - they're mirrored along the
> diagonal. Can't remember which one POV-Ray uses.
> 
> Determining the inverse /transformation/ is simple:
> 
>      #declare Foo = transform { matrix < ... > }
>      #declare FooInv = transform { Foo inverse }
> 
> Actually getting at the corresponding matrix is possible by applying the
> inverted transformation to the axis vectors.
>


Post a reply to this message

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