// Includes #include "retalho.inc" //#include "nuvens.inc" // Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2009-03-09 18:44:03 by stolfi // ====================================================================== // CÂMERA camera{ location < 18.00, 8.00, 5.0 > // Posição do observador. right -0.75*x // Largura RELATIVA da imagem. up 0.60*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 1.00 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source{ 10 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.0 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // EIXOS DE COORDENADAS #macro eixo(ponta,cor,nome) union{ sphere{ <0,0,0>, 0.02 } cylinder{ <0,0,0>, 0.91*ponta, 0.02 } cone{ 0.90*ponta, 0.06, ponta, 0.00 } texture{ pigment{ color rgb cor } finish{ ambient 0.5 diffuse 0.5 } } } #end #macro eixos(tamanho) union{ object{ eixo( , <1.0,0.2,0.2>, "X") } object{ eixo( <0,tamanho,0>, <0.0,0.8,0.0>, "Y") } object{ eixo( <0,0,tamanho>, <0.3,0.3,1.0>, "Z") } } #end // ====================================================================== // 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 < 0.40, 0.40, 0.40 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca_carro = texture{ pigment{ color rgb < 0.40, 0.40, 0.40 > } finish{ diffuse 0.1 ambient 0.1 reflection 0.5 * <1,1,1> } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.90, 0.70 > } finish{ diffuse 0.1 reflection 0.8*< 1.00, 0.90, 0.70 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_fosca1 = texture{ pigment{ color rgb < 1.00, 0.50, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } // ====================================================================== // DESCRIÇÃO DA CENA //#declare raio = 2.000; // Partes da cena: #declare P1 = <1,1>; #declare P2 = <1.5,1.45>; #declare P3 = <2,1.55>; #declare P4 = <1,2>; #declare P5 = <1,2>; #declare P6 = <1.5,2.45>; #declare P7 = <1.9,2.55>; #declare P8 = <1,3>; #declare P9 = <1,3>; #declare P10 = <1.5,3.45>; #declare P11 = <2,3.55>; #declare P12 = <1,4>; #declare P13 = <1,4>; #declare P14 = <1.5,4.45>; #declare P15 = <1.9,4.55>; #declare P16 = <1,5>; #declare P17 = <1,5>; #declare P18 = <1.5,5.45>; #declare P19 = <2,5.55>; #declare P20 = <1,6>; #declare P4 = (P3 + P6) / 2; #declare P5 = (P3 + P6) / 2; #declare P8 = (P7 + P10) / 2; #declare P9 = (P7 + P10) / 2; #declare P12 = (P11 + P14) / 2; #declare P13 = (P11 + P14) / 2; #declare P16 = (P15 + P18) / 2; #declare P17 = (P15 + P18) / 2; //-------------------------------------------------------- #declare Q1 = <1,1>; #declare Q2 = <1,-1>; #declare Q3 = <-1,-1>; #declare Q4 = <-1,1>; #declare Q5 = <1,1>; #declare Q6 = <0,-1>; #declare Q8 =<0,-1>; #declare Q9 =<0,-1>; //----------------------------------------------------------- #macro torre_lathe() lathe { bezier_spline 20, P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #end #macro torre_prisma1(base, altura) prism { conic_sweep linear_spline base, altura, 5, Q1,Q2,Q3,Q4,Q5 pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #end #macro torre_prisma2(base, altura) prism { linear_sweep bezier_spline base, altura, 4, Q1,Q2,Q4,Q5 pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #end #macro torre_prisma3(base, altura) prism { conic_sweep linear_spline base, altura, 4, Q1,Q2,Q4,Q5 pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #end //______________ //Gerando a Cena union { //object { eixos (5) } //object {torre_lathe()translate y * -1 rotate 90 * x translate y * 4 scale <0.8, 0.8, 0.8> } object {torre_prisma1(1,5) translate y * -1 rotate -90 * x translate z*17 scale <1, 1, 1/3> } object {torre_prisma1(4.2,4.5) translate y * -4.3 rotate -90 * x } object {torre_lathe() translate y * -1 rotate 90 * x scale <1/3,1/3,1/3> scale <1,1,2.9> translate <3,-3,0>} object {torre_prisma2(2,6.5) translate y * -3 rotate -90 * x translate <3,3,3.5> } object {torre_prisma3(1,6) scale <1/8, 1, 1/8> rotate -90 * x translate <-3,-3,6> } object {torre_lathe() translate y * -1 rotate 90 * x scale <1/3,1/3,1/3> scale <1,1,2.9> translate <-3,3,0> } }