// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-07-31 12:50:37 by stolfi // ====================================================================== // CÂMERA camera { location < -12, -13, 10 > // Posição do observador. right <-0.6 ,0 ,0> // Largura RELATIVA da imagem. up <0, 0, 0.8> // Altura RELATIVA da imagem. sky <0, 0, 1> // Qual direção é "para cima"? look_at < 20, 20 ,0 > // 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 { < +8.0, +10.0, +5.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } //light_source { // 10 * < 20.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{ color rgb < 1, 1, 0.85 > } #declare chao = plane{ z,0 pigment{ rgb<0.8,0.8,0.8>} } #declare raio = 2.000; #declare tinta_vermelho = texture { pigment { color rgb < 1, 0, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_verde = texture { pigment { color rgb < 0, 1, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_azul= texture { pigment { color rgb < 0.60, 0.60, 1.00 > filter 1 } finish { diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 ambient 0.1 } } #declare cor_fundo= texture { pigment { color rgb < 0.4, 0.4, 0.85 > } // finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare cor_preta= texture { pigment { color rgb < 0.2, 0.2, 0.2 > } // finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_metal= texture { pigment { color rgb <0.75,0.8,0.85> } finish { diffuse 0.05 specular 0.2 roughness 0.05 ambient 0.05 reflection color rgb <0.75,0.8,0.85> } } ////////////////////////////////// #declare fonte = seed(123456789); #declare pacotes_ver= #if (clock<=0.2) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <5*j,4*rand(fonte)+5*i,0>, 0.3 pigment { color rgb } } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.2 & clock<=0.4) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <5*j,4*rand(fonte)+5*i,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+0.5<=20) translate <0,0.5,0> #else translate <0,20-(4*rand(fonte)+5*i+0.5),0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.4 & clock<=0.6) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <5*j,4*rand(fonte)+5*i,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+1<=20) translate <0,1,0> #else translate <0,20-(4*rand(fonte)+5*i+1),0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.6 & clock<=0.8) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <5*j,4*rand(fonte)+5*i,5*j,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+1.5<=20) translate <0,1.5,0> #else translate <0,20-(4*rand(fonte)+5*i+1.5),0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.8) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <5*j,4*rand(fonte)+5*i,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+2<=20) translate <0,2,0> #else translate <0,20-(4*rand(fonte)+5*i+2),0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #declare pacotes_hor= #if (clock<=0.2) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <4*rand(fonte)+5*i,5*j,0>, 0.3 pigment { color rgb } } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.2 & clock<=0.4) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <4*rand(fonte)+5*i,5*j,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+0.5<=20) translate <0.5,0,0> #else translate <20-(4*rand(fonte)+5*i+0.5),0,0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.4 & clock<=0.6) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <4*rand(fonte)+5*i,5*j,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+1<=20) translate <1,0,0> #else translate <20-(4*rand(fonte)+5*i+1),0,0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.6 & clock<=0.8) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <4*rand(fonte)+5*i,5*j,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+1.5<=20) translate <1.5,0,0> #else translate <20-(4*rand(fonte)+5*i+1.5),0,0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #if (clock>0.8) union{ #declare j=1; #while (j<=4) union{ #declare i=1; #while (i<=3) union{ sphere{ <4*rand(fonte)+5*i,5*j,0>, 0.3 pigment { color rgb } #if(4*rand(fonte)+5*i+2<=20) translate <2,0,0> #else translate <20-(4*rand(fonte)+5*i+2),0,0> #end } } #declare i=i+1; #end } #declare j=j+1; #end } #end #declare nos = union{ #declare i=1; #while (i<=4) union{ #declare j=1; #while (j<=4) sphere{ <5*i,5*j,0>, 0.45 texture{tinta_vermelho} } #declare j=j+1; #end } #declare i=i+1; #end } #declare linhas_hor = union{ #declare i=1; #while (i<=4) union{ cylinder{ <5,5*i,0>, <20,5*i,0>, 0.1 texture {tinta_azul} } } #declare i=i+1; #end } #declare linhas_ver = union{ #declare i=1; #while (i<=4) union{ cylinder{ <5*i,5,0>, <5*i,20,0>, 0.1 texture {tinta_azul} } } #declare i=i+1; #end } #declare linhas = union{ object{linhas_ver} object{linhas_hor} } #declare chao = plane { z,-0.3 pigment { rgb <1,1,1> } } ////////////////////////////// // Aqui está a cena, finalmente: linhas nos pacotes_hor pacotes_ver chao