POV-Ray : Newsgroups : povray.general : Matrix and angles Server Time
8 Aug 2024 01:21:40 EDT (-0400)
  Matrix and angles (Message 1 to 3 of 3)  
From: Fabien Mosen
Subject: Matrix and angles
Date: 1 May 2001 13:37:07
Message: <3AEEF370.15166208@skynet.be>
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.


Post a reply to this message

From: Josh English
Subject: Re: Matrix and angles
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

From: Fabien Mosen
Subject: Re: Matrix and angles
Date: 1 May 2001 15:19:51
Message: <3AEF0B84.A479274B@skynet.be>
Josh English wrote:

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

Ooops ! Right !  Why did I use sinus ?  Now that I think about
it, I know that I pictured (in my mind) the trigonometric circle
with the tangent drawn in dots.

Fabien.
 ..slapping myself..


Post a reply to this message

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