POV-Ray : Newsgroups : povray.beta-test : [function pattern] : Re: [function pattern] Server Time
31 Jul 2024 06:17:01 EDT (-0400)
  Re: [function pattern]  
From: Trevor Quayle
Date: 7 Sep 2001 12:07:05
Message: <3b98f0a9$1@news.povray.org>
"Jan Walzer" <jan### [at] lzernet> wrote in message
news:3b98ef19@news.povray.org...
> the following gives an error ...
>
> ----------
> #declare P2=function {pattern {crackle solid}}
> #declare G=
>     function
>
>         #local Faktor=<1,1,1>*0.75;
>         P2(x*(Faktor.x+0),y*(Faktor.y+0),z*(Faktor.z+0))
>     }  //     ^^^^^^------ Expected 'operand', vector function 'vector
> identifier' found instead
> ----------

Someone else probably has a better answer, but I noticed this too.  It seems
the operand *must* be declared as an operand before being used in the
function, i.e.,

 #local Faktor=<1,1,1>*0.75;
#local Fx=Faktor.x;
#local Fy=Faktor.y;
#local Fz=Faktor.z;
P2(x*(Fx+0),y*(Fy+0),z*(Fz+0))

I don't know the reason though

-tgq

>
> Am I wrong ?
> BTW: the parentheses and the "+0" is only because I tried to force some
> "casting" ... it seems there is no such way ...
>
> --
> Jan Walzer <jan### [at] lzernet>
>
>


Post a reply to this message

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