|
 |
Chris Huff <chr### [at] mac com> wrote:
> 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.
Aha! Thanks, Chris. You've managed to solve two major problems for me in
as many days.
Kudos.
Geoff
Post a reply to this message
|
 |