POV-Ray : Newsgroups : povray.newusers : eval_pigment Server Time
26 Dec 2024 12:42:43 EST (-0500)
  eval_pigment (Message 1 to 5 of 5)  
From: Rafal 'Raf256' Maj
Subject: eval_pigment
Date: 14 Jul 2002 18:32:35
Message: <Xns924C4F1FD522raf256com@204.213.191.226>
Hi,
can somebody please give me small but complete example of using 
eval_pigment ?

i have some problems with it, i.e. :

#declare pigm = pigment { onion }
#declare w = eval_pigment(pigm,<0,1,2>);

gives error - cannot assign uninitialized identifier


-- 


Post a reply to this message

From: Christopher James Huff
Subject: Re: eval_pigment
Date: 14 Jul 2002 19:06:31
Message: <chrishuff-AAF0D3.18035414072002@netplex.aussie.org>
In article <Xns### [at] 204213191226>,
 "Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote:

> can somebody please give me small but complete example of using 
> eval_pigment ?
> 
> i have some problems with it, i.e. :
> 
> #declare pigm = pigment { onion }
> #declare w = eval_pigment(pigm,<0,1,2>);
> 
> gives error - cannot assign uninitialized identifier

Make sure you include functions.inc.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: eval_pigment
Date: 14 Jul 2002 19:44:52
Message: <Xns924C11338DEF6raf256com@204.213.191.226>
Christopher James Huff <chr### [at] maccom> wrote in news:chrishuff-
AAF### [at] netplexaussieorg:

>> #declare pigm = pigment { onion }
>> #declare w = eval_pigment(pigm,<0,1,2>);
>> gives error - cannot assign uninitialized identifier
> Make sure you include functions.inc.

thanks :) I forgot about it :/

btw. in Manual it is not so obvious that .inc is neede for that - if You 
type eval_pigment You go to page with not a word about .inc  
and the title "Pre defined functions" may suggest that ther are built-in 
(without using any library) maybe this should be changed ? 

-- 


Post a reply to this message

From: Warp
Subject: Re: eval_pigment
Date: 14 Jul 2002 21:42:13
Message: <3d322874@news.povray.org>
It's anyways more efficient to make a pigment function from your pigment
and then call this function instead of calling the standard macro. This is
specially true if you are going to evaluate the pigment a lot of times.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: eval_pigment
Date: 15 Jul 2002 04:40:54
Message: <3d328a96@news.povray.org>
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in message
news:Xns### [at] 204213191226...
>
> btw. in Manual it is not so obvious that .inc is neede for that - if You
> type eval_pigment You go to page with not a word about .inc
> and the title "Pre defined functions" may suggest that ther are built-in
> (without using any library) maybe this should be changed ?

It probably could do with more emphasis - you are certainly not alone in making
this mistake.


Post a reply to this message

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