POV-Ray : Newsgroups : povray.general : Matrix and angles : Re: Matrix and angles Server Time
7 Aug 2024 23:18:05 EDT (-0400)
  Re: Matrix and angles  
From: Josh English
Date: 1 May 2001 13:48:03
Message: <3AEEF4D5.5D4BF9B2@spiritone.com>
Fabien Mosen wrote:

> I'm doing this :
>
> box {<-10,0,-7>,<10,7,7>
>      matrix <  1, -.5, 0,
>                0,  1,  0,
>                0,  0,  1,
>                0,  0,  0 >
> }
>
> ..which shears the box so the top is no more parallel to the ground
> plane.  However, I have a problem determining at which angle it is now !
> I would have tought that this gives a 30 degrees angle (arcsinus 0.5),
> but placing a 30-degrees rotated object on top of the box proves it
> wrong !  How do I calculate the exact angle ?
>
> Fabien.

It's not arcsin, but arctangent. If you rotate another object by
degrees(atan2(-0.5,1))*z you will get the right angle.

Josh English
eng### [at] spiritonecom


Post a reply to this message

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