// Daniel Camillo Collier Farias RA:059878 // ====================================================================== // 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_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 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 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #macro cabeca(z_rot) union { sphere{ <0.0,0.0,0.0>, 0.7 } cone{ <0.0, 0.0, 0.4>, 0.2, <0.0, 0.0, 2>, 0 rotate -10*x translate 0.15*y} cone{ <0.0, 0.0, 0.4>, 0.2, <0.0, 0.0, 2>, 0 rotate 10*x translate -0.15*y } rotate z_rot*z } #end #macro art_cotovelo(z_rot) union{ sphere{ <0.0,0.0,0.0> 0.3} cone{ <0.0,0.0,0.0>, 0.2, <0.0,1,0.0>, 0.15 } sphere{ <0.0,1,0.0>, 0.4 } rotate z_rot*z } #end #macro art_ombro(z_rot, x_rot, cotovelo_rot) union { sphere{ <0.0,0.0,0.0> 0.3} cylinder{ <0.0,0.0,0.0>, <0.0,1,0.0>, 0.2 } union { art_cotovelo(cotovelo_rot) translate 1*y } rotate } #end #macro pe(y_rot) cylinder{ <0,0,0>, <0,0,1>, 0.5 } union{ box{ <1.6,-0.5,0.4>, <0, 0.5, 0>} rotate y_rot*y } #end #macro art_joelho(y_rot, pe_rot) union { sphere {<0,0,0>, 0.5} cone {<0,0,0>,0.4, <0,0,-1.5> 0.2} union { pe(pe_rot) translate -2.5*z } rotate y_rot*y } #end #macro art_virilha(y_rot, x_rot, joelho_rot, pe_rot) union { sphere {<0,0,0>, 0.8} cone {<0,0,0>,0.7, <0,0,-2> 0.4} union { art_joelho(joelho_rot,pe_rot) translate -2.3*z } scale 0.8 rotate } #end #macro corpo(head_rot, ombrod_z_rot,ombrod_x_rot,cotovelod_rot, ombroe_z_rot,ombroe_x_rot,cotoveloe_rot, virilhad_y_rot, virilhad_x_rot, joelhod_rot, ped_rot, virilhae_y_rot, virilhae_x_rot, joelhoe_rot, pee_rot) sphere{< 0.00, 0.00, 0.00 >, 1 } cone{<0.00,0.00,0.0> 1 , <0.00,0.00,2.2> 0.4} union { cabeca(head_rot) translate 2.7*z } union { art_ombro(ombrod_z_rot,ombrod_x_rot,cotovelod_rot) translate <0,0.7,1.5> } union { art_ombro(ombroe_z_rot,ombroe_x_rot,cotoveloe_rot) translate <0,0.7,1.5> scale -1*y } union { art_virilha(virilhad_y_rot, virilhad_x_rot, joelhod_rot, ped_rot) translate <0,-0.6, -0.5> } union { art_virilha(virilhae_y_rot, virilhae_x_rot, joelhoe_rot, pee_rot) translate <0,-0.6, -0.5> scale -1*y } #end #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ chao translate < 0,0,-5 > texture{ tx_xadrez }} //corpo(head_rot, ombrod_z_rot,ombrod_x_rot,cotovelod_rot, ombroe_z_rot,ombroe_x_rot,cotoveloe_rot, virilhad_y_rot, virilhad_x_rot, joelhod_rot, ped_rot, virilhae_y_rot, virilhae_x_rot, joelhoe_rot, pee_rot) union { corpo(0,-60,-50,-45,-10,-20,-10,-45,0,30,-20,0,0,0,0) translate -4*y } union { corpo(-30,0,0,0,0,0,0,0,-45,0,0,0,0,0,0) translate 4*y } texture{ tx_plastico } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 12.0; #declare dir_camera = < 2, 0, 0 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)