/* Feito por Andre Cesarino, RA 041939.*/ #include "eixos.inc" #include "camlight.inc" #declare centro_cena = < 2.00, 0.00, +3.00 >; #declare raio_cena = 15.0; #declare dir_camera = < 1.00, 7.00, 5.00 >; #declare dist_camera = 50.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz) /* CORES E TEXTURAS*/ background{ color rgb < 0.50, 0.50, 0.50 > } #declare vermelho_fosco = texture { pigment{ color rgb <1.00, 0.00, 0.00>} finish { diffuse 1 specular 0.2 } } #declare verde_fosco = texture { pigment{ color rgb <0.00, 0.70, 0.00>} finish { diffuse 1 specular 0.2 } } #declare verde_escuro = texture { pigment{ color rgb <0.00, 0.30, 0.00>} finish { diffuse 1 specular 0.2 } } #declare azul_fosco = texture { pigment{ color rgb <0.00, 0.00, 1.00>} finish { diffuse 1 specular 0.2 } } #declare branco_fosco = texture { pigment{ color rgb <1.00, 1.00, 1.00>} finish { diffuse 1 specular 0.2 } } #declare preto_fosco = texture { pigment{ color rgb <0.00, 0.00, 0.00>} finish { diffuse 1 specular 0.2 } } #declare cinza_fosco = texture { pigment{ color rgb <0.40, 0.40, 0.40>} finish { diffuse 1 specular 0.2 } } #declare marrom_fosco = texture { pigment{ color rgb <0.60, 0.30, 0.20>} finish { diffuse 1 specular 0.2 } } #declare amarelo_fosco = texture { pigment{ color rgb <1.00, 1.00, 0.00>} finish { diffuse 1 specular 0.2 } } #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_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 } } /* DESCRICAO DA CENA */ #declare chao = box{ <-100,-100,-1>, <+100,+100,0>} #macro braco (tamanho,pos_braco,ang_y_braco,ang_x_braco,ang_antebraco) union { sphere{<0,0,0>,tamanho/4 texture {branco_fosco}} cone {<0,0,0>,tamanho/7,<0,0,-tamanho>,tamanho/10 texture {branco_fosco}} object{antebraco (tamanho,ang_antebraco) } rotate ang_y_braco*y rotate ang_braco*x translate <0,tamanho/5,2*tamanho> translate } #end #macro antebraco (tamanho,ang_antebraco) union { cone{<0,0,0>,tamanho/10,<0,0,-tamanho*2/3>,tamanho/15 texture{branco_fosco}} sphere{<0,0,-tamanho*2/3>,tamanho/5 texture {branco_fosco}} rotate ang_antebraco*x translate <0,0,-tamanho> } #end #macro perna(tamanho,pos_perna,ang_perna,ang_canela,ang_pe) union { sphere{<0,0,0>,tamanho/2 texture {branco_fosco}} cone{<0,0,-tamanho/1.5>,tamanho/3,<0,0,-tamanho>,tamanho/4 texture{branco_fosco}} //object{canela (tamanho,ang_canela,ang_pe) } rotate ang_perna*x translate <-2*tamanho,0,0> translate } #end // #macro canela (tamanho,ang_canela,ang_pe) // union // { // sphere{<0,0,0>,tamanho*3/4 texture {branco_fosco}} // cone{<0,0,-tamanho*2/3>,tamanho/2,<0,0,-tamanho*2/3>,tamanho/3 texture{branco_fosco}} // } // #end // // #macro pe (tamanho,ang_pe) // // #end #macro coelho (posicao, tamanho,ang_braco,ang_antebraco,ang_perna,ang_canela,ang_pe) union { //Corpo e cabeca do coelho sphere {<0,0,0>,tamanho texture {branco_fosco}} cone {<0,0,0>,tamanho,<0,0,tamanho*2>,tamanho/2 texture {branco_fosco}} sphere{<0,0,tamanho*2.5>,tamanho*2/3 texture {branco_fosco}} //Olhos do coelho intersection { sphere{<0,0,tamanho*2.5+0.001>,tamanho*2/3 texture {vermelho_fosco}} cylinder{<-tamanho/3,0,tamanho*2.6+0.001>, <-tamanho/3,2*tamanho,tamanho*2.6+0.001>, tamanho/10 texture {vermelho_fosco}} } intersection { sphere{<0,0,tamanho*2.5+0.001>,tamanho*2/3 texture {vermelho_fosco}} cylinder{, , tamanho/10 texture {vermelho_fosco}} } //Sorriso do coelho intersection { sphere{<0,0,tamanho*2.4+0.001>,tamanho*2/3 texture {preto_fosco}} cylinder{<0,0,tamanho*2.4+0.001>, <0,2*tamanho,tamanho*2.4+0.001>, tamanho/6 texture {preto_fosco}} } //Orelhas do Coelho cone {<-tamanho/5,0,tamanho*3>,tamanho/5,<-tamanho/5,0,tamanho*3.5>,0 texture {branco_fosco}} cone {< tamanho/5,0,tamanho*3>,tamanho/5,< tamanho/5,0,tamanho*3.5>,0 texture {branco_fosco}} //Bracos do coelho object {braco (tamanho,-tamanho/2, 30,ang_braco,ang_antebraco)} object {braco (tamanho, tamanho/2,-30,ang_braco,ang_antebraco)} //Pernas do coelho //object {perna (tamanho, 0, ang_perna, ang_canela, ang_pe)} translate posicao } #end /*Aqui comeca a cena. */ union { object{ eixos(3.00) } object{ chao translate < 0,0,-10> texture {tx_xadrez}} object{ coelho (<0,0,0>, 2, 180, 90, 0, 0, 0) } object{ coelho (<7,0,0> ,2,90,90, 0, 0, 0) } }