// Last edited on 2004-01-23 02:53:45 by stolfi // Exemplo de arquivo de descricao de cena para POV-ray // ====================================================================== #declare ctr = < 10, 10, 0 >; #declare camDir = < -22, -23, 30 >; camera { location ctr + 0.55*camDir right -1.00*x up 0.75*y sky z look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 10*< -2.0, -17.0, +15.0 > color rgb 1.1 * < 1.00, 1.00, 1.00 > } // ====================================================================== // 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.9 specular 0.3 roughness 0.005 ambient 0.1 } } #declare tinta_verde = texture { pigment { color rgb < 0, 1, 0 > } finish { diffuse 0.9 specular 0.3 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.9 specular 0.3 roughness 0.005 ambient 0.1 } } #declare cor_preta= texture { pigment { color rgb < 0.2, 0.2, 0.2 > } // finish { diffuse 0.9 specular 0.3 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,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