|
|
ian mcdonald wrote:
> I never got it to work. I never came close. I don't even know where to start
> beyond needing an intersection testing algorhythm.
You don't need that. The object function does the trick, plus knowing how the
face centered cubic structure is stacked...
Here is the core of my algo:
#declare obfun=pigment {object {MyObject color Black color White}}
#local dd=array[5]
#local drr=(2^0.5)*radii;
#local dd[1]=<0,0,0>;
#local dd[2]=<0,drr,drr>;
#local dd[3]=<drr,0,drr>;
#local dd[4]=<drr,drr,0>;
#local place=dd[nnnn]+<minx+ix*dx,miny+iy*dy,minz+iz*dz>;
#local blank=eval_pigment(obfun,place);
#if (blank.x>0)
sphere {place,radii*1}
#end
Post a reply to this message
|
|