|
|
In article <3a4f3e21@news.povray.org>, "Greg M. Johnson"
<"gregj;-)56590\""@aol.c;-)om> wrote:
> Here is the core of my algo:
>
> #declare obfun=pigment {object {MyObject color Black color White}}
> #local blank=eval_pigment(obfun,place);
Hmm, I use something more like "eval_pattern(object {MyObject})" when I
do this...actually, I wrap it in a macro.
This would make your code shorter and probably slightly reduce parse
time(though the use of a macro might counteract that benefit), the main
advantage is that it is shorter and easier to read.
Instead of:
#declare obfun=pigment {object {MyObject color Black color White}}
...
#local blank=eval_pigment(obfun,place);
#if (blank.x>0)
My version would be:
#macro InObj(Pt, Obj) eval_pattern(object {Obj}, Pt) #end
...
#if(InObj(place, MyObject))
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|