// 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.2, 0.2, 0.5 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.80, 0.10, 0 > } //finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_green = texture{ pigment{ color rgb < 0, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_black = texture{ pigment{ color rgb < 0, 0, 0 > } finish{ diffuse 0.9 ambient 0.1 } } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare caixa = box{ < -8,-8,0 >, <3,8,1>} #declare tela = box{ < -5,-3,1 >, <0,3,2> texture{tx_black} } #declare bola = cylinder{ < -7.00 , -7.00, 1 >, < -7.00, -7.00, 2 >, 0.75 texture{ tx_fosca } } #declare quadrado = box{ < -7.75,-5.5,1 >, <-6.15,-4.5,2> texture{ tx_fosca } } #macro painel (N,k) #if(N<5) box{< -8,-8,0 >, <3,(8+k*2.3),1> texture{ tx_plastico } interior { ior 1.01 } } #else box{ < -8,-8,0 >, <((N-4)*2.5+3),(8+k*2.3),1> texture{ tx_plastico } interior { ior 1.01 } } #end union{ #declare i=0; #while (i } //segunda fileira de quadrados object {quadrado translate #if (mod(i,4)=0) texture {tx_green} scale <1,1, 0.7> #else texture{ tx_fosca } #end} //tela object{tela} //fileira de circulos e quadrados #if (mod(i,2)=0) object{ bola translate texture{tx_green}} #else object {quadrado translate } #end #declare j=0; #while(j #if (mod(i,3)=0) texture {tx_green} scale <1,1, 0.7> #else texture{ tx_fosca } #end} #declare j=j+1; #end #declare i=i+1; #end } #end //chamada da macro painel(8,3) #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 15.0; #declare dir_camera = < 28.00, 14.00, 8.00 >; #declare dist_camera = 200.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)