// 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 < 1.00, 0.95, 0.70 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_nota = texture{ pigment{ color rgb < 0.00, 0.80, 0.00 > } } #declare tx_metal = texture{ pigment{color rgb < 1.00, 0.00, 0.00 > } finish{ reflection 0.30 } } #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 } #declare tx_xadrez2 = texture{ pigment{ checker color rgb < 0.00, 0.00, 0.00 >, color rgb < 1.00, 1.00, 1.00 > } finish{ diffuse 1.0 ambient 1.0 } scale 5.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #macro tronco(angcoxa1x,angcoxa1y,angcoxa1z,angcanela1x,angcanela1y,angcanela1z,angpe1x,angpe1y,angpe1z,angcoxa2x,angcoxa2y,angcoxa2z,angcanela2x,angcanela2y,angcanela2z,angpe2x,angpe2y,angpe2z,angbraco1x,angbraco1y,angbraco1z,angantebraco1x,angantebraco1y,angantebraco1z,angmao1x,angmao1y,angmao1z,angbraco2x,angbraco2y,angbraco2z,angantebraco2x,angantebraco2y,angantebraco2z,angmao2x,angmao2y,angmao2z) union{ sphere{ < +0.00, +0.00, +10.00 >, 4.00 } object{coxa(angcanela1x,angcanela1y,angcanela1z,angpe1x,angpe1y,angpe1z) rotate translate <0,+1.5,8>} object{coxa(angcanela2x,angcanela2y,angcanela2z,angpe2x,angpe2y,angpe2z) rotate translate <0,-1.5,8>} object{braco(angantebraco1x,angantebraco1y,angantebraco1z,angmao1x,angmao1y,angmao1z) rotate translate <0,3.5,10>} object{braco(angantebraco2x,angantebraco2y,angantebraco2z,angmao2x,angmao2y,angmao2z) rotate translate <0,-3.5,10>} } #end #macro cabeca(angx1,angy1,angz1,angx2,angy2,angz2) union{ sphere{ < +0.00, +0.00, +15.4 >, 1.50 } cylinder{ < +1.00, +0.00, 15.4 >, < +3.00, +0.00, 15.4 >, 0.25 } sphere{ < +3.00, +0.00, +15.4 >, 0.25 } object {orelha() rotate translate <0,1,16.4>} object{orelha() rotate translate <0,-1,16.4>} } #end #macro orelha() union{ cylinder{ < +0.00, +0.00, -0.20 >, < +0.00, +0.00, 3.00 >, 0.25 } sphere{ < +0.00, +0.00, +3.00 >, 0.25 } } #end #macro pe() box{ <0,-0.5,-0.13>, <2,+0.5,+0.13> } #end #macro canela(angx,angy,angz) union{ cylinder{ <0,0,-4>, <0,0,0> 0.5 } object{pe() rotate translate <0,0,-4>} } #end #macro coxa(angcanelax,angcanelay,angcanelaz,angpex,angpey,angpez) union{ cone{ <0,0,-7>, 0.6 <0,0,0> , 1 } sphere{ <0,0,-7>, 0.6 } object{canela(angpex,angpey,angpez) rotate translate <0,0,-7.0>} } #end #macro braco(angantebracox,angantebracoy,angantebracoz,angmaox,angmaoy,angmaoz) union{ cylinder{ <0,0,0>, <3,0,0> 0.5 } sphere{ <3,0,0>, 0.5 } object{antebraco(angmaox,angmaoy,angmaoz) rotate translate <3,0,0>} } #end #macro antebraco(angmaox,angmaoy,angmaoz) union{ cylinder{ <0,0,0>, <3,0,0> 0.5 } object{mao() rotate translate <3,0,0>} } #end #macro mao() union{ sphere{ <1,0,0>, 1 } cylinder{ < +1.00, +0.00, -0.00 >, < +2.00, +1.00, 0.00 >, 0.25 } sphere{ < +2.00, +1.00, 0.00 >, 0.25 } cylinder{ < +1.00, +0.00, -0.00 >, < +2.50, +0.00, 0.00 >, 0.25 } sphere{ < +2.50, +0.00, 0.00 >, 0.25 } cylinder{ < +1.00, +0.00, -0.00 >, < +2.00, -1.00, 0.00 >, 0.25 } sphere{ < +2.00, -1.00, 0.00 >, 0.25 } } #end #declare chao = box{ <+20.00,-20.00,-1.00>, <-20.00,+20.00,-0.00> } #include "eixos.inc" union{ union{ object{ tronco(0,0,0,0,-45,0,0,0,0,30,50,-69,-30,0,53,0,0,37,-90,0,0,0,0,-50,0,0,0,0,-20,0,0,0,50,0,0,0) texture{tx_fosca} } object{ eixos(3.00) } object{ cabeca(15,15,15,45,0,-45) texture{tx_fosca} } } union{ object{ tronco(0,0,12,0,-45,0,20,0,0,30,50,-69,-30,0,0,0,0,37,90,0,0,0,0,-50,0,0,0,0,40,0,39,0,10,0,0,0) texture{tx_fosca} } object{ cabeca(15,15,15,45,0,-45) texture{tx_fosca} } translate <0,10,0>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 40.0; #declare dir_camera = < 8, 3, 4.00 >; #declare dist_camera = 60.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)