|
|
emkaah wrote:
> I'm working on a macro, and I get the idea that:
>
> #declare SphereA = sphere{<0,0,0>,5 pigment{Green}}
>
> #declare Count = 0;
> union{
> #while (Count<5)
> object{SphereA translate x*2*Count}
> #declare Count = Count + 1;
> #end
> }
>
> uses a lot more memory then:
>
> union{
> sphere{<0,0,0>,5 pigment{Green} translate x*2}
> sphere{<0,0,0>,5 pigment{Green} translate x*4}
> sphere{<0,0,0>,5 pigment{Green} translate x*6}
> sphere{<0,0,0>,5 pigment{Green} translate x*8}
> sphere{<0,0,0>,5 pigment{Green} translate x*10}
> }
>
> Can somebody tell me this is true? I find this strange for some reason.
The spheres in the union all use the same texture. The separately-
declared spheres all use separate textures (since you gave them
separate ones).
So, if you're going to texture a bunch of things the same way, see if
they can go into a union together, and give the union the texture. This
works very well if the texture is not patterened.
Regards,
John
Post a reply to this message
|
|