// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-09-04 15:25:26 by stolfi // ====================================================================== // CÂMERA camera { location < 0.00, 0.00, 4.00 > // Posição do observador. right 1.00*x // Largura RELATIVA da imagem. up 1.00*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 7.00, 7.00, -10.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 * < +50.0, +30.0, +50.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, +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 < 0.75, 0.80, 0.85 > } // Tintas #declare tinta_red = texture { pigment { color rgb < 0.65, 0.0, 0.0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_green = texture { pigment { color rgb < 0.00, 0.65, 0.0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_blue = texture { pigment { color rgb < 0.00, 0.0, 0.65 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_black = texture { pigment { color rgb < 0.00, 0.00, 0.0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_white = texture { pigment { color rgb < 1.0, 1.0, 1.0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } // Elementos #declare peao = union { cone { < 0.125, 0.125, 0.1 >, 0.10, < 0.125, 0.125, 0.4 >, 0 texture { tinta_red } } sphere { < 0.125, 0.125, 0.4 >, 0.05 texture { tinta_red } } } #declare rei = difference { union { cylinder { < 0.125, 0.125, 0.1 >, < 0.125, 0.125, 0.3 >, 0.07 texture { tinta_blue } } cylinder { < 0.125, 0.125, 0.3 >, < 0.125, 0.125, 0.4 >, 0.10 texture { tinta_blue } } cylinder { < 0.125, 0.125, 0.1 >, < 0.125, 0.125, 0.15 >, 0.10 texture { tinta_blue } } } cylinder { < 0.125, 0.125, 0.32 >, < 0.125, 0.125, 0.42 >, 0.05 texture { tinta_blue } } } #declare torre = union{ box { < 0.166, 0.083, 0.1 >, < 0.083, 0.166, 0.35 > texture { tinta_green } } box { < 0.166, 0.083, 0.35 >, < 0.138, 0.111, 0.4 > texture { tinta_green } } box { < 0.166, 0.138, 0.35 >, < 0.138, 0.166, 0.4 > texture { tinta_green } } } #declare tab_preto = box { < 0.25, 0.00, 0.00 >, < 0.00, 0.25, 0.10 > texture { tinta_black } } #declare tab_branco = box { < 0.25, 0.00, 0.00 >, < 0.00, 0.25, 0.10 > texture { tinta_white } } // Aqui está a cena, finalmente: // Declaracoes #declare j = 0; #declare shift_y = 0; #declare roleta = seed(12345); //Cena union { // Tabuleiro #while (j<20) #declare i = 0; #declare shift_x = 0; #while (i<20) #if (mod(j,2)=0) #if (mod(i,2)=0) object { tab_preto translate } #else object { tab_branco translate } #end #else #if (mod(i,2)=0) object { tab_branco translate } #else object { tab_preto translate } #end #end #declare shift_x = shift_x+0.25; #declare i = i+1; #end #declare j = j+1; #declare shift_y = shift_y+0.25; #end #declare j = 0; #declare shift_y = 0; #while (j<20) #declare i = 0; #declare shift_x = 0; #while (i<20) #declare chance = rand(roleta); //Peao #if( chance < 0.1 ) object{peao translate } #end //torre #if(( chance > 0.4) & (chance < 0.5 )) object{torre translate } #end //rei #if( chance > 0.97 ) object{rei translate } #end #declare i = i+1; #declare shift_x = shift_x+0.25; #end #declare j = j+1; #declare shift_y = shift_y+0.25; #end }