// Laboratório 1 - Diego R. Francisco - 083437 // ====================================================================== // 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_pele = texture{ pigment{ color rgb < 1.00, 0.85, 0.72 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_cabelo = texture{ pigment{ color rgb < 1.00, 0.00, 0.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_roupa = texture{ pigment{ color rgb < 1.00, 0.84, 0.00 > } 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 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #declare caixa = box { <-0.5, -0.5, 0>, <2.5, 2.5, 2> } #declare buraco = box { <-0.25, -0.25, 0>, <2.25, 2.25, 2.01> } #declare corpo = cylinder{ < 1.00, 1.00, 2.00 >, < 1.00, 1.00, 6.00 >, 1 } #declare pescoco = cone { < 1.00, 1.00, 6.00>, 1, < 1.00, 1.00, 8.00>, 0 } #declare cabeca = sphere{ < 1.00, 1.00, 9.00>, 1 } #declare cabelo = cylinder{ < 1.00, 2.50, 9.00 >, < 1.00, -0.50, 9.00 >, 0.5 } // Aqui está a cena, finalmente: union{ object{ chao translate < 0,0,0> texture{ tx_xadrez } } difference{ object{ caixa texture {tx_plastico}} object{ buraco texture {tx_plastico}} } object{ union{ object{ corpo texture {tx_roupa}} object{ pescoco texture {tx_pele}} object{ cabeca texture {tx_pele}} object{ cabelo texture {tx_cabelo}} } translate <0, 0, -2> } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 3.50 >; #declare raio_cena = 10.0; #declare dir_camera = < 14.00, 7.00, 2.00 >; #declare dist_camera = 10.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)