// 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 < -10, 10, 40 > // Posição do observador. right -0.64*x // Largura RELATIVA da imagem. up 0.48*y // Altura RELATIVA da imagem. sky y // Qual direção é "para cima"? look_at < 0.00, 0.00, 0.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 * < 0.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 #include "retalho.inc" #include "nuvens.inc" // ====================================================================== // CORES E TEXTURAS //background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_azul = texture{ pigment{ color rgb < 0,0,1 > } finish{ diffuse 0.1 ambient 0.1 reflection 0.8*< 1,1,1 > } } #declare tx_madeira = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_ferro = texture{ pigment{ color rgb < 0.6, 0.6, 0.6 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 reflection 0.1*< 0.6, 0.6, 0.6 > } } #declare tx_plastico = texture{ pigment{ color rgb < 1,1,1 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 reflection 0.1*< 0.6, 0.6, 0.6 > } } #declare tx_fosca = texture{ pigment{ color rgb < 0.92,0.8,0.51 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.20 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA //------- OBJETOS ----------- #macro coluna_01() #declare p01 = < 0.0,0.0 >/2; #declare p02 = < 1.0,0.7 >/2; #declare p03 = < 2.0,0.0 >/2; #declare p04 = < 1.5,1.5 >/2; #declare p05 = < 3.0,2.0 >/2; #declare p06 = < 1.3,2.0 >/2; #declare p07 = < 1.0,3.0 >/2; #declare p08 = < 0.7,2.0 >/2; #declare p09 = < -1.0,2.0 >/2; #declare p10 = < 0.5,1.5 >/2; prism { linear_sweep bezier_spline 0.0, 4.0, 20, p01, p02, p02, p03, p03, p04, p04, p05, p05, p06, p06, p07, p07, p08, p08, p09, p09, p10, p10, p01 texture{ tx_madeira } } #end #macro coluna_02() #declare p01 = < 0.0,0.0 >/2; #declare p02 = < 1.5,0.0 >/2; #declare p03 = < 3.0,0.0 >/2; #declare p04 = < 3.0,1.0 >/2; #declare p05 = < 2.5,1.5 >/2; #declare p07 = < 1.5,4.5 >/2; #declare p06 = (p05+p07)/2; #declare p08 = < 1.5,7.0 >/2; #declare p09 = < 1.9,7.2 >/2; #declare p10 = < 2.1,7.4 >/2; #declare p11 = < 2.5,8.0 >/2; #declare p12 = < 1.5,8.0 >/2; #declare p13 = < 0,8.0 >/2; lathe { bezier_spline 20, p01, p02, p02, p03, p03, p04, p05, p06, p06, p07, p07, p08, p08, p09, p10, p11, p11, p12, p12, p13 texture{ tx_madeira } } #end #macro coluna_03() #declare p01 = < 0.0,0.0 >/2; #declare p02 = < 0.5,2.0 >/2; #declare p03 = < 1.0,3.2 >/2; #declare p05 = < 1.0,4.8 >/2; #declare p04 = (p03+p05)/2; #declare p06 = < 0.5,6.0 >/2; #declare p07 = < 0.0,8.0 >/2; lathe { bezier_spline 8, p01, p02, p03, p04, p04, p05, p06, p07 texture{ tx_madeira } } #end #macro templo_teto() #declare p01 = < 0.0,0.0 >; #declare p02 = < 20.0,0.0 >; #declare p03 = < 10.0,3.0 >; prism { linear_sweep 0.0, 10.0, 4, p01, p02, p03, p01 texture{ tx_fosca } } #end #macro templo_teto_detalhe() #declare p01 = < 0.0,0.0 >; #declare p02 = < 16.0,0.0 >; #declare p03 = < 8.0,2.3 >; prism { linear_sweep 0.0, 0.5, 4, p01, p02, p03, p01 texture{ tx_ferro } } #end #macro templo_casa() box { < 0,0,0 >, < 12,4,8 > texture{ tx_fosca } } #end #macro templo_chao_1() box { < 0,0,0 >, < 20,0.5,10 > texture{ tx_fosca } } #end #macro templo_chao_2() box { < 0,0,0 >, < 21,0.5,10.5 > texture{ tx_fosca } } #end #macro templo_chao_3() box { < 0,0,0 >, < 22,0.5,11 > texture{ tx_fosca } } #end #macro templo() union { difference { object { templo_teto() rotate -90*x translate < -10,0,2 > } object { templo_teto_detalhe() rotate -90*x translate < -8,0.2,2.1 > } } object { templo_casa() translate < -6,-4,-8 > } object { templo_chao_1() translate < -10,-4.5,-8 > } object { templo_chao_2() translate < -10.5,-5,-7.5 > } object { templo_chao_3() translate < -11,-5.5,-7 > } object { coluna_03() translate < -8,-4,-5 > } object { coluna_02() translate < -8,-4,0 > } object { coluna_01() translate < -4,-4,0.5 > } object { coluna_03() translate < 0,-4,1.5 > } object { coluna_01() translate < 4,-4,0.5 > } object { coluna_02() translate < 8,-4,0 > } object { coluna_03() translate < 8,-4,-5 > } } #end //------- CENA ----------- union { object { eixos(3.00) } object { templo() } //rotate -90*y //rotate -90*z //rotate -150*x }