1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
union{ //-----------------------------------
//#for(Identifier, Start, End [, Step])
#for (NrX, 0, 4, 1) // outer loop
#for (NrY, 0, 4, 1) // middle loop
#for (NrZ, 0, 4, 1) // inner loop
sphere{ <0,0,0>,0.4
translate< NrX*1, NrY*1, NrZ*1>
texture{ pigment{ color rgb<1.0,0.1,0.20>*1}
finish { phong 1 reflection { 0.4 metallic 0.5} }
}
}
#end // ------------- end z of #for outer loop
#end // ------------- end y of #for middle loop
#end // ------------- end x of #for inner loop
rotate<0,0,0>
translate<0,0,0>
} // end of union --------------------------
|