// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2017-05-07 20:10:09 by stolfilocal // ====================================================================== // Cores e Texturas background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico_branco = texture{ pigment{ color rgb < 1.0, 1.0, 1.0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico_preto = texture{ pigment{ color rgb < 0.0, 0.0, 0.0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico_vermelho = texture{ pigment{ color rgb < 0.90, 0.20, 0.10 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico_azul = texture{ pigment{ color rgb < 0.1, 0.2, 0.9 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } // ====================================================================== // Declaração de Macros // Bola unitária // Pé #macro P5(TEX) union { sphere{ <0, 0, 0.23>, 0.03 texture{ TEX } } cylinder{ <0, 0, 0.2>, <0, 0, 0>, 0.03 texture{ TEX } } } #end #macro P4(B5, TEX) union { sphere{ <0, 0, 0.23>, 0.03 texture{ TEX } } cylinder{ <0, 0, 0.2>, <0, 0, 0>, 0.03 texture{ TEX } } object{ P5(TEX) rotate translate <0, 0, 0.26> } } #end #macro P3(B4, B5, TEX) union { sphere{ <0, 0, 0.23>, 0.03 texture{ TEX } } cylinder{ <0, 0, 0.2>, <0, 0, 0>, 0.03 texture{ TEX } } object{ P4(B5, TEX) rotate translate <0, 0, 0.26> } } #end #macro P2(B3, B4, B5, TEX) union { sphere{ <0, 0, 0.23>, 0.03 texture{ TEX } } cylinder{ <0, 0, 0.2>, <0, 0, 0>, 0.03 texture{ TEX } } object{ P3(B4, B5, TEX) rotate translate <0, 0, 0.26> } } #end #macro P1(B2, B3, B4, B5, TEX) union { sphere{ <0, 0, 0.23>, 0.03 texture{ TEX } } cylinder{ <0, 0, 0.2>, <0, 0, 0>, 0.03 texture{ TEX } } object{ P2(B3, B4, B5, TEX) rotate translate <0, 0, 0.26> } } #end #macro Perna(B1, B2, B3, B4, B5, TEX) object { P1(B2, B3, B4, B5, TEX) scale<1, -1, 1> rotate } #end #include "eixos.inc" // ====================================================================== // Declaração de cena object{ eixos(1.0) } object{ cylinder{ <1, -1, 1.2>, <1, 2, 1.2>, 0.3 texture{ tx_plastico_vermelho } } } object{ Perna(90, 45, 30, 15, 10, tx_plastico_vermelho) translate <0.3, 0, 0> } object{ Perna(90, 45, 30, 15, 10, tx_plastico_vermelho) translate <0.3, 1, 0> } object{ Perna(90, 45, 30, 15, 10, tx_plastico_vermelho) translate <0.3, 2, 0> } object{ Perna(90, 45, 30, 15, 10, tx_plastico_vermelho) translate <1.7, 0, 0> } object{ Perna(90, 45, 30, 15, 10, tx_plastico_vermelho) translate <1.7, 1, 0> } object{ Perna(90, 45, 30, 15, 10, tx_plastico_vermelho) translate <1.7, 2, 0> } // ====================================================================== // Declaração de Câmera #include "camlight.inc" #declare centro_cena = < 0.5, 0.5, 0.5>; #declare raio_cena = 2.0; #declare dir_camera = < 45, 0, 0 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)