// 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_vermelho = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #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 } } #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 din = box{ <0,0,0>, <0.2,0.5,4> texture{ tx_fosca } } #macro cabeca () union{ sphere{ < 0,0,5 >, 2 texture{ tx_plastico }} sphere{ < 1.4,-1,6.5 >, 0.2 texture{ tx_plastico }} sphere{ < 1.4,1,6.5 >, 0.2 texture{ tx_plastico } } sphere{ < 1.5,0,5 >, 0.3 texture{ tx_plastico }} cone { < 0,-1,6.2 >, 0.5, < 0,-1,10 >, 0.2 texture{ tx_plastico }} cone { < 0,1,6.2 >, 0.5, < 0,1,10 >, 0.2 texture{ tx_plastico }} box{ < 2.1,-1,5 >, < 0, 1, 5.1 > texture{ tx_vermelho } } } #end #macro corpo () union{ sphere{ < 0,0,0 >, 2 texture{ tx_plastico }} torus {3,2 texture{ tx_vermelho }} } #end #macro braco () union{ cylinder{ < 0,0,0 >,< 0,3,0 > 0.4 texture{ tx_fosca }} } #end #macro antbraco () union{ cylinder{ < 0,0,0 >,< 0,2,0 > 0.4 texture{ tx_vermelho }} } #end #macro coxa () union{ cylinder{ < 0,0,0 >,< 0,0,-3 > 0.5 texture{ tx_fosca }} } #end #macro canela () union{ cylinder{ < 0,0,0 >,< 0,0,-1.6 > 0.5 texture{ tx_vermelho }} cylinder{ < 0,0,-1.5 >,< 0,0,-2.55 > 0.55 texture{ tx_plastico }} } #end #macro ped () union{ cylinder{ < 0,0,0 >,< 0,2,0 > 0.55 texture{ tx_plastico }} } #end #macro subperna (a1) union{ object { ped() rotate translate < 0,-0.2,-2.55> } object { canela() } } #end #macro perna (a1, a2) union{ object { subperna(a1) rotate <-a2,0,0>translate < 0,0,-2.5> } object { coxa() } } #end #macro subbraco (a4) union{ object { antbraco() rotate translate < 0,2.8,0> } object { braco() } } #end #macro boneco (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) union{ object { perna(a1,a2) rotate translate < 0,2,-4> } object { perna(a6,a7) scale <1,-1,1> rotate <-a7,0,0> translate < 0,-2,-4> } object { cabeca() } object { corpo() rotate <0,0,90> } object { subbraco(a4) rotate translate < 0,3,1> } object { subbraco(a9) scale <1,-1,1> rotate <-a10,0,0> translate < 0,-3,1> } } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object { boneco(45,45,45,45,45,45,45,45,45,45) translate < 0,-10,0> } object { boneco(0,0,0,0,0,0,0,0,0,0) translate < 0,10,0> } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 30.0; #declare dir_camera = < 18, 0, 0 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)