// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-09-18 13:38:45 by stolfi // ====================================================================== // CÂMERA camera { location < 1.00, 1.00, 6.00 > // Posição do observador. right -1.00*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. sky y // 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 { 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 cor_cristal = <1.00, 0.0, 0.0>; #declare tx_cristal= texture{ finish{ ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color cor_cristal filter 1} } #declare cor_cristal2 = <0.10, 0.90, 1.00>; #declare tx_cristal2= texture{ finish{ ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color cor_cristal2 filter 1} } #declare cor_espelho = <1.00, 0.80, 0.10>; #declare tx_espelho = texture{ pigment{ rgb cor_espelho } finish{ ambient 0.05 diffuse 0.05 reflection cor_espelho specular 0.20 roughness 0.05 } } #declare cor_prata = <0.9, 0.8, 0.8>; #declare tx_prata = texture{ pigment{ rgb cor_prata } finish{ ambient 0.05 diffuse 0.05 reflection cor_prata specular 0.20 roughness 0.05 } } #declare cor_espelho2 = <0.10, 0.80, 1.00>; #declare tx_espelho2 = texture{ pigment{ rgb cor_espelho2 } finish{ ambient 0.05 diffuse 0.05 reflection cor_espelho2 specular 0.20 roughness 0.05 } } #declare tinta_A = texture { pigment { color rgb < 1.0-clock, 0.80, clock > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < clock, 0.80, 1.0-clock > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare vermelho = texture{ pigment { color rgb <1,0,0>} } #declare verde = texture{ pigment { color rgb <0,1,0>} } #declare bola = sphere { < 0.00, 0.00, 0.00 >, 2.00 texture { tinta_A } } #declare furo = cylinder { < -1.00, -2.00, -2.00 >, < +1.00, +2.00, +2.00 >, 1.50 texture { tinta_B } } #declare pino = cylinder { < -2.00, +2.00, -1.00 >, < +2.00, -2.00, +1.00 >, 0.75 texture { tinta_B } } #declare jogo = text { ttf "arial.ttf" "O JOGO" 0.15, 0 texture {tinta_B} } #declare versus = text { ttf "arial.ttf" "X" 0.15, 0 } #declare formula = text { ttf "arial.ttf" "FORMULA" 0.15, 0 texture {tinta_A} } #declare fome = text { ttf "arial.ttf" "FOME" 0.15, 0 texture {vermelho} } #declare chutou = text { ttf "arial.ttf" "CHUTOU!" 0.15, 0 texture {verde} } #declare gol = text { ttf "arial.ttf" "GOL!!!" 0.15, 0 texture {tx_espelho} } #declare um = text { ttf "arial.ttf" "1" 0.15, 0 texture {tx_espelho2} } #declare zero = text { ttf "arial.ttf" "0" 0.15, 0 texture {tx_cristal} } #declare trave = prism { linear_sweep linear_spline 0, // sweep the following shape from here ... 0.4, // ... up through here 5, // the number of points making up the shape ... <0,0>, <0,3>, <4,3>, <4,0>, <0,0> pigment { checker color <0,0,0>, color <1,1,1> } } #declare trave2 = prism { linear_sweep linear_spline -1, // sweep the following shape from here ... 2, // ... up through here 5, // the number of points making up the shape ... <0.3,-1.0>, <0.3,2.7>, <3.7,2.7>, <3.7,0>, <0.3,-1.0> pigment { checker color <0,0,0>, color <1,1,1> } } #declare traves = difference{ object {trave} object {trave2} rotate -90*x } #declare bola= sphere { <0,0,3>, 0.3 pigment { checker color <0,0,0>, color <1,1,1> } } #declare prato1= lathe { linear_spline 5, <0,0>, <1,0>, <1.2,0.4>, <0,0.4>, <0,0> pigment {color rgb<0.9,0.9,0.9>} } #declare prato2= lathe { linear_spline 5, <0,0.1>, <0.9,0.1>, <1.1,0.8>, <0,0.9>, <0,0.1> pigment {color rgb <0.9,0.9,0.9>} } #declare prato= difference{ object {prato1} object {prato2} rotate 90*x scale <0.4,0.4,0.4> } //===================== a cena ============================== #if (clock<0.16) union{ object {jogo translate <-2.00,0,0>} rotate 360*6*clock*y } #end #if (clock >= 0.16) #if (clock < 0.32) object {formula translate <-6.25*clock, 1, 0>} object {versus} object {fome translate <-3.9*clock, -1,0>} #end #end #if (clock >= 0.32) #if (clock < 0.48 ) object {chutou translate <-2.00, 0, 0>} #end #end #if (clock >= 0.48) #if (clock < 0.64) object { traves translate <-2.30,-1.0,-5.0>} object { bola translate } object {gol translate <-2.00, 0, 0> scale 2.5*clock*<1,1,1>} #end #end #if (clock >= 0.64) #if (clock < 0.80) object {formula translate <-3.00, 0, 0>} object {um translate <2,0,0>} #end #end #if (clock >= 0.80) object {fome translate <-1.25, 0,0>} object {prato rotate 360*6*clock*y translate <2.2,0.35,0>} #end //union { //object {jogo} //rotate 360*clock*z //} // Aqui está a cena, finalmente: //difference { //union { //object { bola } //object { pino } //} //object { furo } //rotate 360*clock*z //}