Why not try the following code which I created that combines the two methods I
provided in my previous posts?
// build a section of brick road
#declare o_Section =
union {
#declare Z = 0;
#while (Z < 20)
#declare X = 0;
#while (X < 20)
#declare brick_translate = <(X-10 #if(Z/2=int(Z/2)) +0.5
#end)*(8+l_Gap), 0, Z*(4+l_Gap)>/12;
object {
o_Brick
texture {
pigment { eval_pigment(p_Brick, x*rand(l_Seed)) }
}
translate brick_translate
}
object {
o_Brick
scale y * 1.001
translate brick_translate
}
#declare X = X + 1;
#end
#declare Z = Z + 1;
#end
}
// put some sections together to build a road
#declare o_Road =
union {
#declare S = 0;
#while (S < 10)
#declare section_translate = z*S*20*(4+l_Gap)/12;
#declare brick_translate = 2*(20-10)*(8+l_Gap)/12;
object {
o_Section
texture {
pigment {p_Stripe_z}
translate x*.5
scale brick_translate
translate -section_translate
}
translate section_translate
}
#declare S = S + 1;
#end
}
object { o_Road }
Post a reply to this message
|