// Exemplo de arquivo de descricao de cena para POV-ray // ====================================================================== // CÂMERA #include "colors.inc" #include "stones.inc" #include "metals.inc" #include "woods.inc" camera { location <10.00, 5.00, 30.00> // Posição do observador. right -0.75*x // Largura RELATIVA da imagem. up 1.00*y sky y // Qual direção é "para cima"? look_at < 10.00, 5.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 * < +40.0, +30.0, +40.0 > // Posição da lâmpada. color rgb 1.2 * < 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.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA //background { White } background{ color rgb < 0.75, 0.80, 0.85 > } #macro vertice(a,b,c) sphere { , 0.5 pigment {color Green} } #end #declare filho1 = 1; #declare filho2 = 2; #declare filho3 = 3; #declare tamanho = 3; #macro arvore(n,a,b,c,filho) #local la = a; #local lb = b; #local lc = c; #local lfilho = filho; #local nl = tamanho; union { #if (n = 0) object{vertice(la+1,lb+1,lc+1)} #if (filho = filho1) cylinder{ ,, 0.1 pigment {color Black} } #else #if (filho = filho2) cylinder{ ,, 0.1 pigment {color Black} } #else cylinder{ ,, 0.1 pigment {color Black} } #end #end #else object {arvore(n-1,la-0.5,lb-0.5,lc-0.5,filho1)} object {arvore(n-1,la+0.5,lb-0.5,lc+0.5,filho2)} object {arvore(n-1,la+1.5,lb-0.5,lc-0.5,filho3)} #end object{vertice(la+1,lb+1,lc+1)} #if (lfilho > 0) #if (lfilho = filho1) cylinder{ ,, 0.1 pigment {color Black} } #else #if (filho = filho2) cylinder{ ,, 0.1 pigment {color Black} } #else cylinder{ ,, 0.1 pigment {color Black} } #end #end #end } #end object {arvore(tamanho,10,10,10,0) translate <-2,-2.5,-2.3>} cylinder { <10,7,6>,<10,0,6>, 1.3 pigment {color <0.6,0.4,0.2>} }