// 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 < 30.00, 30.00, 20.00 > // Posição do observador. right -1*x // Largura RELATIVA da imagem. up 1*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 15.00, 15.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 * < +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 > } #declare raio = 2.000; #declare tinta_Branca = texture { pigment { color rgb < 0.00, 0.0, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Preta = texture { pigment { color rgb < 1.00, 1.00, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Amarela = texture { pigment { color rgb < 1.00, 0.00, 1.00 > } finish { diffuse 0.5 specular 0.8 roughness 0.005 ambient 0.1 } } #declare tinta_Verde = texture { pigment { color rgb < 0.00, 1.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Azul = texture { pigment { color rgb < 0.00, 0.00, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare casa = box { <0, 0, 0>,<1 ,1, 1> } #declare tabuleiro = #declare i = 0; //gera as casas ao longo do eixo x #declare j = 0; //gera as casas ao longo do eixo y #declare cor = 1; #while ( i < 20 ) #while ( j < 20 ) object {casa texture {#if (cor > 0) tinta_Branca #else tinta_Preta #end } translate} #declare j = j + 1; #declare cor = cor * -1; #end #declare j = 0; #declare i = i + 1; #declare cor = cor * -1; #end #declare cone_rei = cone { <0.0, 0.0, 0.0>, 0.50 // Center and radius of one end <0.0, 0.0, 1.0>, 0.25 // Center and radius of other end } #declare esfera_rei = sphere { < 0.00, 0.00, 0.00 >, 0.3 } #declare coroa_rei = difference { cone { <0.0, 0.0, 0.0>, 0.15 // Center and radius of one end <0.0, 0.0, 0.40>, 0.35 // Center and radius of other end } cone { <0.0, 0.0, 0.0>, 0.13 // Center and radius of one end <0.0, 0.0, 0.40>, 0.33 // Center and radius of other end } } #declare rei = union { object { cone_rei translate<0.0, 0.0, 1.0> } object { esfera_rei translate<0.0, 0.0, 2.2> } object { coroa_rei translate<0.0, 0.0, 2.5>} } #declare cone_peao = cone { <0.0, 0.0, 0.0>, 0.50 // Center and radius of one end <0.0, 0.0, 1.5>, 0.20 // Center and radius of other end } #declare cabeca_peao = cone { <0.0, 0.0, 0.00>, 0.10 // Center and radius of one end <0.0, 0.0, 0.35>, 0.10 // Center and radius of other end } #declare peao = union { object { cone_peao translate<0.0, 0.0, 1.0> } object { cabeca_peao translate<0.0, 0.0, 2.5>} } #declare cone_torre = cone { <0.0, 0.0, 0.0>, 0.40 // Center and radius of one end <0.0, 0.0, 1.0>, 0.00 // Center and radius of other end } #declare corpo_torre = cone { < 0.00, 0.00, 0.00 >, 0.3 < 0.00, 0.00, 1.00 >, 0.3 } #declare base_torre = box { <-0.40, -0.40, 0.00>, <0.40, 0.40, 0.20> } #declare torre = union { object { base_torre translate<0.0, 0.0, 1.0> } object { corpo_torre translate<0.0, 0.0, 1.20> } object { cone_torre translate<0.0, 0.0, 2.20>} } //Desenhando object {tabuleiro} //object {rei texture{tinta_Verde} translate<0.5, 0.5, 0.0> } //object {peao texture{tinta_Verde} translate<1.5, 0.5, 0.0> } //object {torre texture{tinta_Verde} translate<2.5, 0.5, 0.0> } #declare roleta = seed(79); #declare i = 0; //casas ao longo do eixo x #declare j = 0; //casas ao longo do eixo y #declare jogador = 1; #while ( i < 7 ) #while ( j < 20 ) #if ( int(rand(roleta)*4) = 1) object {rei texture{tinta_Azul} translate<0.5+i, 0.5+j, 0.0> } object {rei texture{tinta_Verde} translate<19.5-i,19.5-j, 0.0> } #end #if ( int(rand(roleta)*4) = 2) object {peao texture{tinta_Azul} translate<0.5+i, 0.5+j, 0.0> } object {peao texture{tinta_Verde} translate<19.5-i,19.5-j, 0.0> } #end #if ( int(rand(roleta)*4) = 3) object {torre texture{tinta_Azul} translate<0.5+i, 0.5+j, 0.0> } object {torre texture{tinta_Verde} translate<19.5-i,19.5-j, 0.0> } #end #declare j = j + 1; #declare cor = cor * -1; #end #declare j = 0; #declare i = i + 1; #end