|
|
Oleguer Vilella nous apporta ses lumieres en ce 2005-01-29 11:25:
> Hi all,
>
> I have done this code:
> ======================================
> #declare lipid = union {
> blob{ threshold 0.1
> sphere {<0, 0, 0>, 2 ,1 texture {pigment { color Red }finish { ambient 0.2
> diffuse 0.8 phong 1 }}}
> }}
>
> #macro Make_Stuff (Stuff,How_Many)
> #local Ample=-12;
>
> #while (Ample<How_Many)
> object{Stuff rotate <0,0*Ample,0> translate<3*Ample,9*cos (Ample/8),0> }
> #local Ample=Ample+1;
> #end
> #end
>
> #declare layer = union {Make_Stuff (lipid,100)}
> global_settings { max_trace_level 29 }
>
> #macro Make_Many (Stuff,How_Many)
> #local Fons=0;
>
> #while (Fons<How_Many)
> object{Stuff translate <0,3*sin (Fons/8),3*Fons> translate <10, -20, 30>}
> #local Fons=Fons+1;
> #end
> #end
>
> union {Make_Many (layer,50)}
> ======================================
> How can I unife all the spheres?
> Thanks in advance.
>
> Oleguer
>
>
You can start by removing the union and blob from the lipid object:
#declare Lipid=sphere{0,2,1 texture{pigment{color Red}finish{ambient 0.2 diffuse 0.8
phong 1}}}
Then, in the Layer object:
#declare Layer=blob{thresshold 0.1 Make_Stuff(Lipid,100)}
I did not try it.
Note: it's beter to *always* start any user defined identifier with a capital letter,
it prevent any
name clash with built-in reserved name, present and future. Who know if a future
fersion could use
"layer" for some purpose?
Alain
Post a reply to this message
|
|