// ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.30, 0.70, 0.70 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.70, 0.70, 0.80 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_pedra = texture{ pigment { color rgb <0.4, 0.2, 0> } finish { diffuse 0.9 ambient 0.1 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 12.0 } // ====================================================================== // DESCRIÇÃO DA CENA #declare pe = union { sphere {<0,0,0>, 0.15} box {<0,-0.1,-0.1>, <0.5,0.1,0.1>} } #macro perna1(a0) union { sphere {<0,0,0>, 0.2} box {<0,-0.1, -0.1>, <1,0.1,0.1>} object {pe rotate <0, 90-a0> translate <1,0,0>} } #end #macro perna2(a1, b1, a0) union { sphere {<0,0,0>, 0.2} box {<0, -0.1, -0.1>, <2,0.1,0.1>} object { perna1(a0) rotate <0, a1, b1> translate <2,0,0>} } #end #macro perna3(a2, a1, b1, a0) union { sphere {<0,0,0>, 0.2} box {<0, -0.1, -0.1>, <2,0.1,0.1>} object { perna2(a1, b1, a0) rotate <0, a2, 0> translate <2,0,0>} } #end #macro perna4(a3, b3, a2, a1, b1, a0) union { sphere {<0,0,0>, 0.3} box {<-0.2,0,-0.2>, <0.2,1.5,0.2>} object { perna3(a2, a1, b1, a0) rotate <0, a3+90, b3> translate <0,1.5,0>} } #end #macro inseto(AP) union { cone {<0,0,0>, 1, <0,-6,0>, 0.2} box {<-1,0,-1>, <1,9,1>} sphere {<0,9,2>, 1.5} cone {<0,10.5,2>, 0.5, <0,14,2>, 0} #local i = 0; #while (i < 6) #local pos = <2, 1+3*div(i, 2), 0>; object { perna4(AP[i][3], AP[i][4], AP[i][5], AP[i][6], AP[i][7], AP[i][8]) rotate translate pos scale <1-2*mod(i, 2),1,1> } #local i = i + 1; #end } #end #declare AP0 = array[6][9] #declare api = 0; #while (api < 6) #declare apj = 0; #while (apj < 9) #declare AP0[api][apj] = 0; #declare apj = apj+1; #end #declare api = api+1; #end object { inseto(AP0) texture{tx_fosca}} #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 20; #declare dir_camera = < 14, 7.00, 6.00 >; #declare dist_camera = 5 * raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)