#local RND1 = seed(1); #local R1 = 1000; #local R2 = 0; #declare posbi0 = box { <-R1, -R1, -R1>, texture { pigment { color rgb <1, 1, 1> } } } #declare Foo = function(r, lo, hi) { r + lo + hi } #declare rand2 = function(R, Lo, Hi) { R * (Hi - Lo) - Lo } #declare posbi1 = union { object { posbi0 } #local S = 200; #local X = -2*R1; #while (X <= 2*R1) #local Y = -2*R1; #while (Y <= 2*R1) #local P = trace(posbi0, , -); #switch (rand(RND1) * 3) #range(0, 1) box { <-1, -1, -1> <+1, +1, +1> scale S/2 #if (1) matrix < rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), 0, 0, 0 > #end translate P texture { pigment { color rgb <1, 0, 0> } } } #break #end #local Y = Y + 2*S; // YYY #end #local X = X + 2*S; // XXX #end } #declare posbi = object { posbi1 }