// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // 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 < 0.80, 0.80, 0.30 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 0.60, 0.65, 0.70 > } finish{ diffuse 0.2 reflection 0.3*< 0.60, 0.65, 0.70 > 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.72, 0.20 >, color rgb < 0.2, 0.2, 0.20 > } finish{ diffuse 0.9 ambient 0.1 } scale 0.5 } #declare tx_rosto = texture{ pigment{ color rgb < 1, 0.80, 0.70 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_chapeu = texture{ pigment{ color rgb < 1, 0.10, 0.0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_olho = texture{ pigment{ color rgb < 0.5, 0.50, 1.0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_nariz = texture{ pigment{ color rgb < 0.9, 0.30, 0.8 > } finish{ diffuse 0.9 ambient 0.1 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: #declare chao = box{ <-15,-15,-1>, <+15,+15,0> } #declare caixa = box { <-2,-2,-2>, <2,2,2>} #declare furocaixa= box { <-1.9,-1.9,-1.9>, <1.9,1.9,2.1> texture{tx_fosca}} #declare cabeca= sphere{ <0,0,0>, 1.5 texture{ tx_rosto } } #declare olho= sphere{ <0,0,0>, 0.2 texture{tx_olho} } #declare nariz= cone{ <0,0,0>, 0.25, <0,0,1>, 0 texture{tx_nariz} } #declare chapeu= cone{ <0,0,0>, 0.6, <0,0,2>, 0 texture{tx_chapeu} } #declare boca= sphere{ <0,0,0>, 0.3 texture{tx_fosca} } #include "eixos.inc" // Aqui está a cena, finalmente: union{ //object{ eixos(5.00) } object{ chao translate<0,0,-2> texture{tx_espelho}} //Caixa difference{ object{ caixa texture{tx_xadrez} } object{ furocaixa } } //Surpresa union{ difference{ object{cabeca translate <0,0,2.1>} union{ object{olho translate <0.6,0.9,3.1>} object{olho translate <-0.6,0.9,3.1>} object{boca scale<1.4,1,1> translate <0,1.4,2.2>} } } object{nariz rotate -45*x translate <0,1.2,2.9>} object{chapeu translate <0,0,3.4>} } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 9.0; #declare dir_camera = < 7.00, 11.00, 7.50 >; #declare dist_camera = 26.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)