POV-Ray : Newsgroups : povray.advanced-users : Frustration!! : Re: Frustration!! Server Time
1 Jul 2024 06:16:02 EDT (-0400)
  Re: Frustration!!  
From: Chris B
Date: 15 Aug 2009 10:11:18
Message: <4a86c206@news.povray.org>
"Lioness" <cat### [at] livecouk> wrote in message 
news:web.4a86b6d0c3f6caf95a751fb0@news.povray.org...
> Hi all,
>
> I have a smal problem and I hope you can help me ....
>  ... snip ...
> #declare Val1 = function{Image1(x,y,z).gray}
> #declare Val2 = function{Image2(x,y,z).gray}
>
>  ... snip ...
>
>    #if(Val1 > Val2)
>       function{(1-Image1(x,y,z).red)*(1-Image2(x,y,z).red)/1}
>
>  ... snip ...
>
> Everything works fine until I put the if-then-else thing in ...
>

The problem is that your #if statement is comparing two function 
definitions. Instead you need to compare the results of evaluating the two 
functions.
I suspect you probably meant to write something like:

#declare Val1 = Image1(x,y,z).gray;
#declare Val2 = Image2(x,y,z).gray;

Regards,
Chris B.


Post a reply to this message

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