// ====================================================================== // CÂMERA camera { location < ((10*clock)-10)+0.50, 16.00-(4*clock), 8.00 > // Posição do observador. right 1*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.50, 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 { 10 * < +40.0, +20.0, +40.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz. } // ====================================================================== // DESCRIÇÃO DA CENA //fundo: background { color rgb < 0.75, 0.80, 0.85 > } //texturas: #declare tinta_Azul = < 0.00, 0.00, 1.00 >; #declare tinta_Amarela = < 1, 1, 0>; #declare tinta_Prata = < 1, 1, 1>; #declare metal_Azul = texture { pigment { rgb tinta_Azul } finish { ambient 0.05 diffuse 0.05 reflection tinta_Azul specular 0.2 roughness 0.05 } } #declare metal_Prata = texture { pigment { rgb tinta_Prata } finish { ambient 0.05 diffuse 0.05 reflection tinta_Prata specular 0.2 roughness 0.05 } } #declare metal_Amarelo = texture { pigment { rgb tinta_Amarela } finish { ambient 0.05 diffuse 0.05 reflection tinta_Amarela specular 0.2 roughness 0.05 } } #declare transp_Prata = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color tinta_Prata filter 1 } } #declare transp_Azul = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color tinta_Azul filter 1 } } //objetos: #declare chao = plane { <0,0,1>, 0 pigment { checker color rgb <.4,.6,.4>, color rgb <.8,.8,.8>} finish { ambient .4 diffuse 0.7 } } #declare nohs = union { #declare i = -4; #while (i <= 4) #declare j = -4; #while (j <= 4) box { texture { transp_Azul } } #if (i = -4) cylinder { , 0.4+((sin(pi*clock))/3) texture { metal_Amarelo } } #end #declare j = j + 4; #end #declare i = i + 4; #end } #declare linhas_y = union { #declare i = -4; #while (i <= 4) #declare j = -4; #while (j <= 0) cylinder { , 0.3 texture { transp_Prata } } #declare j = j + 4; #end #declare i = i + 4; #end } #declare linhas_x = union { #declare i = -4; #while (i <= 0) #declare j = -4; #while (j <= 4) cylinder { , 0.3 texture { transp_Prata } } #declare j = j + 4; #end #declare i = i + 4; #end } #declare linhas_z = union { #declare i = -4; #while (i <= 4) cylinder { , 0.2 texture { transp_Prata } } #declare i = i + 4; #end } #declare fonte = seed(2345); #declare pacotes = union { #declare c = 1; #while (c <= 8) #declare conta = rand(fonte); #if (conta <= 0.25) #declare lugar = -3.2 + rand(fonte)*7.2; #declare frente = rand(fonte); sphere { , /* linha do meio em x */ 0.3 pigment { color rgb } #if (frente <= 0.5) translate <(4.4-lugar)*clock,0,0> #else translate <(-3.6-lugar)*clock,0,0> #end } #else #if (conta <= 0.5) #declare lugar = -3.2 + rand(fonte)*7.2; #declare frente = rand(fonte); cylinder { <0.4,lugar,0.25>, /* linha do meio em y */ <0.4,lugar,0.75> 0.15 pigment { color rgb } #if (frente <= 0.5) translate <0,(4.4-lugar)*clock,0> #else translate <0,(-3.6-lugar)*clock,0> #end } #else #if (conta <= 0.75) #declare lugar = -3.2 + rand(fonte)*7.2; #declare frente = rand(fonte); sphere { <4.4,lugar,0.5>, /* linha mais à direita em y */ 0.3 pigment { color rgb } #if (frente <= 0.5) translate <0,(4.4-lugar)*clock,0> #else translate <0,(-3.6-lugar)*clock,0> #end } #else #declare lugar = -3.2 + rand(fonte)*7.2; #declare frente = rand(fonte); cylinder { , /* linha mais à frente em x */ 0.15 pigment { color rgb } #if (frente <= 0.5) translate <(4.4-lugar)*clock,0,0> #else translate <(-3.6-lugar)*clock,0,0> #end } #end #end #end #declare c = c + 1; #end } // ======================================================================== // CENA union { object { chao } object { nohs } object { linhas_y } object { linhas_x } object { linhas_z } object { pacotes } }