// ====================================================================== // CÂMERA camera { //orthographic//isometric location < 300.00, 0.00, 0.00 > // Posição do observador. right 1.0*x // Largura RELATIVA da imagem. up 1.0*y // Altura RELATIVA da imagem. sky z // 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 { < 0.0, 0.0, 0.0 > // Posição da lâmpada. color rgb 0.5* < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < 0.0, 20.0, 20.0 > // Posição da lâmpada. color rgb 0.5 *< 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < 0.0, -20.0,-20.0 > // Posição da lâmpada. color rgb 0.5 *< 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < 300.0, 0.0, 0.0 > // Posição da lâmpada. color rgb 2.0 *< 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.4, 0.4, 0.6 > } #declare vidro = texture { pigment { color rgb < 1.0, 1.0, 1.0 > filter 1} finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } //interior {ior 1.5} #declare ce1 = <0.7, 0.3, 0.3> #declare espelho1 = texture { pigment { color rgb ce1} finish { diffuse 0.5 specular 0.20 roughness 0.05 ambient 0.05 reflection ce1} } #declare ce2 = <0.3, 0.7, 0.3> #declare espelho2 = texture { pigment { color rgb ce2} finish { diffuse 0.5 specular 0.20 roughness 0.05 ambient 0.05 reflection ce1} } #declare ce3 = <0.3, 0.3, 0.7> #declare espelho3 = texture { pigment { color rgb ce3} finish { diffuse 0.5 specular 0.20 roughness 0.05 ambient 0.05 reflection ce1} } #declare verde=texture{ pigment { color rgb <0.0,1.0,0.0>} finish { diffuse 0.5 specular 0.20 roughness 0.05 ambient 0.05} } #declare noh = sphere { <0, 0, 0> 10 } #declare pacote = sphere { <0, 0, 0> 3 texture {verde} } #declare l = 80; #declare h = l*sqrt(3)/2; #declare d = l*sqrt(6)/3; #declare tx = 3; #declare ty = 6; #declare tz = 6; #macro maresta( p1, p2 ) cylinder {p1 p2 3 texture {vidro}} #declare q=rand(s); #if(q<0.1) #declare w = rand(s); object{pacote translate ((w)*p1+(1-w)*p2) } #end #end #macro mposicao(i, j, k) #declare p=<(k-tx/2)*d, (j-ty/2 + 1/2*(mod(i,2)-mod(k,2)) )*l, (i-tz/2 + 1/2*mod(k,2))*h>; #end #declare s=seed(0); union { #declare i=0; #while(i=0.67) object{noh translate p texture{espelho1}} #end #if((r<0.67)*(r>=0.33)) object{noh translate p texture{espelho2}} #else object{noh translate p texture{espelho3}} #end mposicao(i,j,k) #declare p0=p; mposicao(i,j+1,k) #declare p1=p; mposicao(i+1,j-1+mod(i,2),k) #declare p2=p; mposicao(i+1,j+mod(i,2),k) #declare p3=p; mposicao(i,j,k-1) #declare p4=p; mposicao(i-1,j,k-1) #declare p5=p; mposicao(i,j-1,k-1) #declare p6=p; maresta(p0, p1) maresta(p0, p2) maresta(p0, p3) maresta(p0, p4) maresta(p0, p5) maresta(p0, p6) #declare k=k+1; #end #declare j=j+1; #end #declare i=i+1 #end }