// 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, 0.70 > } finish{ diffuse 0.8 ambient 0.2 specular 0.5 roughness 0.005 } } #declare tx_olho = 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.505 } } #declare tx_braco = texture{ pigment{ color rgb < 0.80, 0.20, 0.70 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_chapeu = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_nariz = texture{ pigment{ color rgb < 0.5, 0.1, 0.7 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_boca = texture{ pigment{ color rgb < 0.8, 0.6, 0.2 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_corpo = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.9 reflection 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 } #declare tx_caixa = texture{ pigment{ checker color rgb < 0.8, 0.5, 0 >, color rgb < 0, 0, 1 > } finish{ diffuse 0.9 ambient 0.1 } scale 0.5 } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: #declare olho = sphere{ < 0,0,2*raio >, 0.20 texture {tx_olho} } #declare boca = box{ <0.8,0.8,0>, <-0.8,-0.8,0.5> texture{ tx_boca } } #declare nariz = cone{ <0,0,-0.2>,0.2,<0,0,0.2>,0 texture{ tx_nariz } } #declare chapeu = cone { <0,0,2.5+raio>,raio-0.5,<0,0,6+raio>,0 texture{ tx_chapeu } } #declare cabeca = sphere{ < 0.00, 0.00, 1+raio >, raio texture{ tx_plastico } } #declare corpo = cylinder{ < 0, 0, 1.5 >, < 0, 0, -4 >, 1 texture{ tx_corpo } } #declare bracos = cylinder{ < -1, 2, 0 >, < 1, -2, 0 >, 0.5 texture{ tx_braco } } #declare furo = cylinder{ < 0, 0, 2 >, < 0, 0, -1.5 >, 0.90*raio texture{ tx_caixa } } #declare caixa = box{ , <-raio,-raio,-raio> texture{ tx_caixa } } #include "eixos.inc" // Aqui está a cena, finalmente: union{ object { corpo } difference{ object{ caixa translate <0,0,-4>} object{ furo translate <0,0,-2> } } difference{ object{cabeca} object{boca translate <1.9,1.4,raio>} } object{nariz translate <1.8,1.2,2*raio-0.8> } object{chapeu} object{olho translate <0.9,1.7,0> } object{olho translate <2,0.2,0> } object{bracos translate <0,0,raio/2-0.5>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)