// CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #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 2.0 } #declare tx_verde = texture{ pigment{ color rgb < 0.00, 1.00, 0.00 > } } // DESCRIÇÃO DA CENA #declare fino = 0.100; #declare grosso = 1.000; // Partes da cena: #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #macro coxa(a, b, c) union{ cylinder{ <0.00 , 0.00, 0.00>, <0.00 , 0.00, -1.00>, fino texture{ tx_plastico } rotate } object{ perna(b, c) translate <0, 0, -1> rotate texture{ tx_plastico }} } #end #macro perna(b, c) union{ cylinder{ <0.00 , 0.00, 0.00>, <0.00 , 0.00, -1.00>, fino texture{ tx_plastico } rotate } object{ pe(c) texture{ tx_plastico } translate <0, 0, -1> rotate } } #end #macro pe(c) cylinder{ <0.00 , 0.00, 0.00>, <0.00 , 0.00, -0.50>, fino texture{ tx_plastico } rotate } #end #macro braco(b, c) union{ cylinder{ <0.00 , 0.00, 0.00>, <0.00 , 1.00, 0.00>, fino texture{ tx_plastico } rotate } object{ mao(c) texture{ tx_plastico } translate <0, 1, 0> rotate } } #end #macro mao(c) cylinder{ <0.00 , 0.00, 0.00>, <0.00 , 1.00, 0.00>, fino texture{ tx_plastico } rotate } #end #declare corpo = union{ cylinder{ <0.00 , 0.00, 0.00>, <0.00 , 0.00, 3.00>, grosso texture{ tx_plastico } } sphere{ <0.00, 0.00, 4.00>, 1.00 texture{ tx_plastico } } } #macro gato(Y, A, B, C, D, E, F, G, H, I, J) union{ object{ coxa(A, B, C) translate<0, 0.5, 0>} object{ coxa(D, E, F) scale<+1, -1, +1> translate<0, -0.5, 0>} object{ braco(G, H) translate<0, 1, 2>} object{ braco(I, J) scale<+1, -1, +1> translate<0, -1, 2>} object{ corpo } translate <0, Y, 0> } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object{ chao translate < 0,0,-5 > texture{ tx_xadrez } } object{ gato (3, 30, -30, 45, 30, -30, 45, 30, -30, 30, -30)} object{ gato (-3, 45, -45, 90, 45, -45, 90, -30, 30, -30, 30)} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 2.00 >; #declare raio_cena = 8.0; #declare dir_camera = < 14.00, 0.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)