|
 |
In article <3a3f7c6f@news.povray.org>, Geoff Wedig
<wed### [at] darwin epbi cwru edu> wrote:
> What you wrote works, but if you have:
>
> #declare test_function = function { Func }
>
> eval_pattern(test_function, Pt)
That won't work because you are just passing the function identifier.
The eval_pattern() function takes a *pattern*. Use this instead:
eval_pattern(function {test_function(x, y, z)}, Pt)
The "function {}" is necessary, because that is what tells POV it is a
function pattern.
Oh, and a partial workaround for the range problem:
#macro Eval_Func(Func, MaxRange, X, Y, Z)
eval_pattern(function {Func(x, y, z)/MaxRange}, < X, Y, Z>)*MaxRange
#end
A slightly more complex macro could be written to handle any range, you
just need to tell it what range your function will be using.
--
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
|
 |