|
![](/i/fill.gif) |
In article <39AC60D1.D4A0E968@istar.ca>, sde### [at] istar ca wrote:
> However, Pov still complains when it gets to the first line of the
> code which contains the n variable, saying "numeric expression
> expected but undeclared identifier 'n' found instead."
This sounds like a typo somewhere. Make sure you use an upper-case
letter in all variables to avoid conflicts with keywords, and make sure
you use the same variable name in the pigment as you used in the macro
parameter list.
> Am I missing something fundamental here?
Try something more like this:
#macro PigmentFunc (n)
pigment { bla bla n bla bla }
#end
...
texture {PigmentFunc(0.5)}
You can also use the macro to declare a pigment, like this:
#declare MyPigment = PigmentFunc(0.35)
> Would there be any benifit in my posing the code?
It would help us to find what exactly is wrong with it, but you seem to
be doing it in a round-about way, you might want to completely change
the way you are doing it.
--
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
|
![](/i/fill.gif) |