|
 |
In article <39AC2738.5D9668D1@istar.ca>, sde### [at] istar ca wrote:
> I've created a pigment type which depends on a variable, n. If I
> #declare n before the pigment code, it runs correctly.
>
> However, I would like to be able to call this pigment type many times,
> with different values of n. I thought that I could simply remove the
> #declare before the pigment code, and use the code like:
You aren't "calling a pigment type", you are creating a copy of a
variable which has already been parsed.
> How can I use the pigment code as a procedure, called with the variable?
> I've tried #macro, but haven't gotton anything working.
The macro feature is what you want. Just wrap the pigment definition in
a macro statement and use the parameters to specify your variables. What
were you trying to do?
#macro Radial(Rays, ClrA, ClrB)
pigment {radial
frequency Rays
color_map {
[0 color ClrA]
[1 color ClrB]
}
}
#end
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |