// 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_folha = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_pe = texture{ pigment{ color rgb < 1, 1, 1 > } finish{ diffuse 1 ambient 0.1 } } #declare tx_corpo = pigment { wood turbulence 0.05 scale <0.2, 0.2, 1> color_map { [0.1 rgb <0.42, 0.26, 0.15>] [0.9 rgb <0.52, 0.37, 0.26>] } } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 1.000; // Partes da cena: #declare orelha = cone { <0,0,0>,0.5,<0,0,1>,0 texture{ tx_corpo } } #declare coxa = cylinder { <0,-1.5,0>, <0,1.5,0>, 0.4 texture{ tx_corpo } } #declare braco = cylinder { <0,-1.5,0>, <0,1.5,0>, 0.4 texture{ tx_corpo } } #declare canela = cylinder { <0,0,0>, <0,3,0>, 0.4 texture{ tx_corpo } } #declare antebraco = cylinder { <0,0,0>, <0,2,0>, 0.3 texture{ tx_corpo } } #declare pe = box{ <0,0,0><2,1,1> texture { tx_pe } } #macro foot() object{ pe translate<0,0,0> } #end #macro prebraco(ante) object{ antebraco rotate} #end #macro arm(brac,ante,dist) union{ object{ braco } object{ prebraco(ante) translate<0,dist,0> } } #end #macro perna(cox,anpern,dist,peh,distpeh) union{ object{ coxa } object{ anteperna(anpern,dist,peh,distpeh) translate<0,dist,0> } } #end #macro anteperna(anpern,dist,peh,distpeh) union{ object{ canela rotate } // object{ foot() rotate translate<0,dist,0>} } #end #macro corpo() union{ //cabeca sphere{ < 0, 0, 0 >, raio texture{ tx_corpo } } //corpo sphere{ < 0, 0, -3*raio+0.2 >, raio*2 texture{ tx_corpo } } object{ orelha translate<0,0,1> rotate<-30,0,0> } object{ orelha translate<0,0,1> rotate<30,0,0> } } #end #macro gato(brac,ante,cox,anpern,peh) union{ object{ corpo() translate<0,0,3> } object{ arm(brac,ante,1.5) rotate<-brac,0,0> translate<0,3,0>} object{ arm(brac,ante,-1.5) rotate translate<0,-3,0> } object{ perna(cox,anpern,1.5,peh,3) rotate<-cox,0,0> translate<0,2,-2> } object{ perna(cox,anpern,-1.5,peh,-3) rotate translate<0,-2,-2> } } #end #declare relogio = cylinder{ <0,0,0>, <0,2,0>, raio-0.5 } #include "eixos.inc" // Aqui está a cena, finalmente: object { gato(30,30,30,30,30) translate<0,-15,0>} object { gato(0,0,0,0,0) translate<0,0,0>} object { gato(45,45,45,45,45) translate<0,15,0>} #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, -3.00 >; #declare raio_cena = 30.0; #declare dir_camera = < 21.00, 2.00, 4.00 >; //#declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 2.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)