POV-Ray : Newsgroups : povray.binaries.scene-files : Sky simulation : Re: Sky simulation Server Time
25 Apr 2024 09:26:46 EDT (-0400)
  Re: Sky simulation  
From: Fractracer
Date: 1 Jul 2013 06:40:00
Message: <web.51d15b7b59bb6361916440570@news.povray.org>
scott <sco### [at] scottcom> wrote:
> > Hello, I try your macro but I've got an error on line:
> > #local xyYtoR = function (x,y,Y){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
> > -0.4986)*Y/SkyMaxLuminance }
> > where Y seems undefined.
> > I am wrong?
>
> Y is one of the parameters for the function, so it becomes defined when
> the function is called. What version of POV are you using? I've tried it
> on 3.6 and 3.7 with no issues.
>
> On 30/06/2013 18:14, Alain wrote:
>  > This is a reason to NOT use "X", "Y" or "Z" as user variable names.
>  > It can lead to some confusion.
>
> I wouldn't normally do such a thing, but the colour space used by the
> algorithm is Yxy. My POV version didn't complain or get confused about
> using Y and y, so this makes the equations easier to read. I suppose I
> could have used _Y or something.

It works (not fine but with no errors) when I change Y by z:
#local xyYtoR = function (x,y,z){ (x/y* 3.2406  -1.5372 + (1-x-y)/y *
-0.4986)*Y/SkyMaxLuminance }
I know this is not the good value but I try to see what happens.
I use v3.6 and v3.7 with the same result.


Post a reply to this message

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