POV-Ray : Newsgroups : povray.advanced-users : Simulating vignetting in a camera : Re: Simulating vignetting in a camera Server Time
29 Jul 2024 04:29:58 EDT (-0400)
  Re: Simulating vignetting in a camera  
From: Tor Olav Kristensen
Date: 7 Feb 2003 23:05:02
Message: <web.3e44810368f85955b417814a0@news.povray.org>
hughes, b. wrote:
>... I can't seem to get POV-Ray to produce the
>same result for cos(A)^4 by using pow(cos(A),4). Am I doing that wrong? For
>example, I find cos(20/2)^4 in a calculator to be
>0.94060186578282644642735371998179 and yet in POV it is 0.495673773. Maybe
>the order in which the operands work causing the discrepency? Although I
>don't see how that could be the reason at all.
>...

Bob, POV-Ray uses radians while your calculator uses
degrees. You can write the expression like this:

pow(cos(radians(20/2)), 4)

- if you want POV-Ray to give the same results as
your calculator.

(Or you can set your calculator to radians mode.
If it is a Casio, then you can probably do this
by pressing MODE and then 5)

If you want to use the acos function in POV-Ray
and want to have the result in degrees, then you
can just write:

degrees(acos(0.5))


Tor Olav


Post a reply to this message

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