|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> "Leroy" <whe### [at] gmail com> wrote:
> > Related to the post above.. Why was eval_pigment dropped? Why not expand it?
> > If not kept as a built in function, why not put it in one of the include files?
> >
> > Have Fun?
>
> eval_pigment is a macro in the functions.inc file.
>
> It is, as has been pointed out in the past, simply a wrapper for a pigment
> function.
>
>
> #macro eval_pigment(pigm, vec)
> #local fn = function { pigment { pigm } }
> #local result = (fn(vec.x, vec.y, vec.z));
> result
> #end
>
> You plug in your <x, y, z> vector, and out pops the <r, g, b> color vector at
> that point in the pattern, image_map, etc.
Hi
Naming functions is often problematic.
So suggest that that macro is rewritten, e.g. like this:
#include "vectors.inc" // https://github.com/t-o-k/Useful-POV-Ray-macros
#macro EvalPigment(Pigment, v0)
FunctionValue(
function {
pigment { Pigment }
},
v0
)
#end // macro EvalPigment
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
|
 |