POV-Ray : Newsgroups : povray.beta-test : [function pattern] Server Time
5 Nov 2024 05:24:47 EST (-0500)
  [function pattern] (Message 1 to 3 of 3)  
From: Jan Walzer
Subject: [function pattern]
Date: 7 Sep 2001 12:00:25
Message: <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
----------

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

From: Trevor Quayle
Subject: Re: [function pattern]
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

From: Thorsten Froehlich
Subject: Re: [function pattern]
Date: 7 Sep 2001 14:27:34
Message: <3b991196@news.povray.org>
In article <3b98f0a9$1@news.povray.org> , "Trevor Quayle" 
<Tin### [at] hotmailcom> wrote:

> 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;

Yes, unfortunately this is required right now.  I am not sure this will get
changed in 3.5 because it has to do with handling vectors in function which
isn't supported in 3.5.  It will change in 4.0 of course and I will look
into allowing at least such a simple case in 3.5.


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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