// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_1 = texture{ pigment{ checker color rgb < 1, 0, 0 >, color rgb <0,0,1> } finish{ diffuse 0.7 ambient 0 specular 0.5 roughness 0.9 } } #declare tx_2 = texture{ pigment{ color rgb < 0.5, 0.5, 0.50 > } finish{ diffuse 0.2 reflection 0.2 ambient 0.1 } } #declare tx_tiro = texture{ pigment{ color rgb < 1.00, 0, 0 > } finish{ diffuse 0.2 reflection 0.2 ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02} } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.5, 0.44, 0.98 >, color rgb < 0.00, 0.86, 0.29 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare raio = 1; #declare caixa_1 = box{ <-4,-4,0>, <4,4,8> texture{tx_1} } #declare caixa_2 = box{ <-3.8,-3.8,0.2>, <3.8,3.8,9> texture{tx_vidro} } #declare tampa = box{ <0,0,0>, <8,8,0.2> texture{tx_1} } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> texture {tx_xadrez} } #declare cilindro_grande = cylinder{ < 0,0,0 >, <0,0,5>, raio texture{tx_2} } #declare cilindro_medio = cylinder{ < 0,0,0 >,<0,0,4>, 0.8*raio texture{tx_2} } #declare cilindro_pequeno = cylinder{ < 0, 0, 0 >,<0,0,3>, 0.5*raio texture{tx_2} } #declare chapeu = cone{ <0,0,2>, 0.00, <0,0,0>, raio texture{tx_tiro} } #declare foguete = cone{ <0,0,2>, raio, <0,0,0>, 1.6*raio texture{tx_tiro} } #declare bola = sphere {<0,0,0>, 2} #include "eixos.inc" union{ difference{ object{caixa_1} object{caixa_2} } object{tampa translate <-8,0,8> rotate 45*z} } union{ object{cilindro_grande} object{cilindro_medio translate <0,0,3>} object{cilindro_pequeno translate <0,0,6>} translate <0,0,2> rotate 15*x } union{ object{cilindro_grande scale <0,0,2>} object{chapeu translate <0,0,10>} object{foguete} translate <0,0,10> rotate -15*x rotate 15*y } object {bola translate <0,6,0> texture{tx_vidro} } object{chao} // Aqui está a cena, finalmente: /*union{ object{ eixos(3.00) } object{ chao translate < 0,0,-5 > texture{ tx_xadrez } } object{ bolota translate < -2,+1,+3 > } object{ bolinha translate < +5,+4,+2 > texture{ tx_vidro } interior { ior 1.01 } } difference{ union{ object{ bola } object{ pino } } object{ furo } } }*/ #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 30; #declare dir_camera = < 14.00, 7.00, 20 >; #declare dist_camera = 28.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)