POV-Ray : Newsgroups : povray.binaries.images : Visualizing camera view frustum : Re: Visualizing camera view frustum Server Time
26 Apr 2024 05:35:47 EDT (-0400)
  Re: Visualizing camera view frustum  
From: scott
Date: 18 Apr 2017 08:59:10
Message: <58f60d9e$1@news.povray.org>
> so the calculation basically works out to be 2 * atan2 (0.666666666666666.....)

atan2 takes 2 parameters, this is important and likely where you've gone 
wrong. Make sure you've got the parameters the right way round - Excel 
takes (x,y) not (y,x).

If you've already pre-calculated the y/x gradient (eg 0.66666) then for 
atan2 to give the correct result in Excel you need to use 
atan2(1,0.666666). If you do it the other way round atan2(0.66666,1) 
then you're going to get the wrong answer.

>   converted to degrees
> which ought to be very close to 67.38

2*degrees(atan2(1,0.666666)) gives 67.38 degrees in Excel.


Post a reply to this message

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