#include "camlight.inc" #include "eixos.inc" #include "textures.inc" #include "objs.inc" // ====================================================================== // DESCRICAO DA CENA #declare raio = 1.000; #declare PI = 3.14159; #declare space = 2.000; /////////////////// braco //////////////////// #macro braco(b3, b4) union { #local sub = object { antebraco(b4) } object{ toco } object{ sub rotate <0, b3, 0> translate <0, 0, 2> } } #end #macro antebraco(b4) union { #local sub = object { mao() } object{ toco } object{ sub rotate <0, b4, 0> translate <0, 0, 2> } } #end #macro mao() object{ palma } #end /////////////////// pescoco //////////////////// #macro pescoco(b3, b4) union { #local sub = object { nuca(b4) } object{ toco } object{ sub rotate translate <0, 0, 2> } } #end #macro nuca(b4) union { #local sub = object { m_cabeca() } object{ toco } object{ sub rotate <0, b4, 0> translate <0, 0, 2> } } #end #macro m_cabeca() object{ cabeca } #end // Partes da cena: // #declare chao = box{ <-50,-50,-1>, <+50,+50,0> } // object{ chao translate < -50,-50,-50 > texture{ tx_xadrez } } #macro bicho(b01, b02, b03, b04, b11, b12, b13, b14, b21, b22, b23, b24, b31, b32, b33, b34, p1, p2, p3, p4) object { braco(b03, b04) rotate translate < -2.0 , 2.00, 2.5 > } object { braco(b13, b14) rotate scale <-1, 1, 1> translate < 2.0 , 2.00, 2.5 > } object { braco(b23, b24) rotate translate < -2.0 , -2.00, 2.5 > } object { braco(b33, b34) rotate scale <-1, 1, 1> translate < 2.0 , -2.00, 2.5 > } object { pescoco(p1, p2) rotate translate < 0.0 , 3.0, 2.5 > } #end bicho(-10, 200, -10, -10, -10, 200, -10, -10, 10, 200,-10, -10, 10, 200,-10, -10, 40, 0, -90, 0) union { object { corpo translate <0, 0, 2> } object { eixos(5) } } #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 20.0; #declare dir_camera = < 45.00, 45.00, 45.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.0; camlight(centro_cena, raio_cena, dir_camera, dist_camera, z, intens_luz)