// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-07-31 12:50:37 by stolfi // ====================================================================== // CÂMERA #declare zoom = 0.9; camera { location < 1,-1, 0.7 >*7 // Posição do observador. right <1.00, -0.60, 0.00> // Largura RELATIVA da imagem. up <0.00, 0.00, 0.80> // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0, 0, 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 { 10 * < 50, -10.0, +10.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < -50.0, 10.0, 70.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < 0.0, -10.0, 10.0 > // Posição da lâmpada. color rgb 0.9 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA #declare C = 1/255; background{ color rgb < 0.95, 0.90, 0.68 > } #declare cor_cristal = <0.8,0.9,1>; #declare tx_cristal = texture { finish{ ambient 0.1 diffuse 0.1 reflection 0.15 specular 1 roughness 0.001 } pigment { color cor_cristal filter 1 } } #declare cor_espelho = <0.1,0.1,0.2>; #declare tx_espelho = texture { pigment { rgb cor_espelho } finish { ambient 0.05 diffuse 0.05 reflection 0.95 specular 0.20 roughness 0.05 } } #declare azul = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare amarelo = texture { pigment { color rgb < 1.00, 0.80, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare vermelho = texture { pigment { color rgb < 1.0, 0.0, 0.0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare verde = texture { pigment { color rgb < 0.0, 1.0, 0.0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare laranja = texture { pigment { color rgb < 252*C, 200*C, 81*C > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare preto = texture { pigment { color rgb < 0*C, 0*C, 0*C > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare xadrez = texture { pigment {checker color rgb <1,1,0.9> color rgb <0,0,0.9> } } // Objetos // Os eixos para auxilio #declare eixo_x = cylinder { < -50, 0, 0 >, < 50, 0, 0 >, 0.1 texture { vermelho } } #declare eixo_y = cylinder { < -50, 0, 0 >, < 50, 0, 0 >, 0.1 texture { verde } rotate <0,0,90> } #declare eixo_z = cylinder { < -50, 0, 0 >, < 50, 0, 0 >, 0.1 texture { azul } rotate <90,90,0> } #declare eixos = union{ object{eixo_x} object{eixo_y} object{eixo_z} } //O Chao #declare chao = box{ <-50,-50,0>, <50,50,-1> texture { xadrez } } //--------------------------------------------------------// // 1-clock #declare clock_inv = 1 - clock; // Angulo do toro em y #if (clock < 0.25) #declare ang_toro_y1 = 16*clock*360; #else #declare ang_toro_y1 = 0; #end #if (clock > 0.75) #declare ang_toro_y2 = 16*clock_inv*360; #else #declare ang_toro_y2 = 0; #end // Angulo do toro em x #if (clock < 0.25) #if (clock > 0.125) #declare ang_toro_x1 = 16*clock*360; #else #declare ang_toro_x1 = 0; #end #else #declare ang_toro_x1 = 0; #end #if (clock_inv < 0.25) #if (clock_inv > 0.125) #declare ang_toro_x2 = 16*clock*360; #else #declare ang_toro_x2 = 0; #end #else #declare ang_toro_x2 = 0; #end //--------------------------------------------------------// //--------------------------------------------------------// #declare semente = seed(314839756265438); #declare lim_inferior = -10; #declare lim_superior = 10; // Grade em y #declare Count = lim_inferior; #while ( Count < lim_superior ) cylinder { < lim_inferior-2, Count, 0 >, < lim_superior, Count, 0 >, 0.15 texture { tx_cristal } } //Os pacotes de y #declare Count2 = lim_inferior; #while (Count2 < lim_superior) //Cor do pacote #declare tx_pacote = texture { pigment { color rgb < rand(semente), rand(semente), rand(semente) > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #if (Count2 > lim_inferior-2) #if (Count2 < lim_superior-2) cylinder { 0.11 texture{tx_pacote} } #end #end //Nós #declare tx_no = texture { pigment { color rgb < rand(semente), rand(semente), rand(semente) > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } sphere{ ,0.25 texture {tx_no} } #declare Count2 = Count2 + 2; #end #declare Count = Count + 2; #end //Grade em x #declare Count = lim_inferior; #while ( Count < lim_superior) cylinder { < Count,lim_inferior-2, 0 >, < Count,lim_superior, 0 >, 0.15 texture { tx_cristal } } //Os pacotes de x #declare Count2 = lim_inferior; #while (Count2 < lim_superior) //Cor do pacote #declare tx_pacote = texture { pigment { color rgb < rand(semente), rand(semente), rand(semente) > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #if (Count2 > lim_inferior-2) #if (Count2 < lim_superior-2) cylinder { 0.11 texture{tx_pacote} } #end #end #declare Count2 = Count2 + 2; #end #declare Count = Count + 2; #end sky_sphere { pigment { gradient z color_map { [(1-cos(radians( 30)))/2 color <247*C,200*C,255*C>] [(1-cos(radians(120)))/2 color <255*C,213*C,80*C>] } scale 2 translate -1 } } //------------------------ // Aqui está a cena, finalmente: //union{ // object{eixos} // object{gradex} //object{chao} //}