// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== //INCLUDES #include "eixos.inc" #include "textures.inc" #include "camlight.inc" #include "colors.inc" // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ Jade } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > 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 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare tx_pedra = texture{ pigment{ crackle scale 1.5 turbulence 0.35 color_map{ [0.04 color Black] [0.08 color Black] [0.32 color rgb<1,0.65,0>] [1.00 color rgb<1,1.0,0.5>] } // end of color_map scale 0.2 } // end of pigment normal { bumps 0.75 scale 0.02} finish { diffuse 0.9 phong 1} rotate<0,-30,0> translate<0.01, 0.04, 0.00> } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: #declare caixa= box{ <-3,-3,-3>,<3,3,5> } #declare caixa_vidro= box{ <-3,-3,-3>,<3,3,4> texture{Glass} } #declare caixa_menor= box{ <-3,-3,-6>,<3,3,3> } #declare bola_menor= sphere{ < 0,0,0 >, raio/1.1 } #declare bolinha= sphere{ < 0,0,0 >, raio/8 } #declare bola_maior = sphere{ < 0,0,0 >, 1.3*raio } #declare bola = sphere{ < 0.00, 0.00, 0.00 >, raio } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #declare peca = difference{ object{bola_maior texture{Glass} translate < 0,0,5 >} object{caixa texture{Chrome_Metal}} } #declare handle= torus{4,0.3} #declare braco= union{ object{handle texture{Chrome_Metal} translate <-4,0.2,6> } object{handle texture{Chrome_Metal} translate <-4,-0.2,6> } } #declare espremedor= cylinder{ <0,0,4.8> ,<0,0,5>,raio/1.1} // Aqui está a cena, finalmente: union{ object{ chao translate < 0,0,-5 > texture{ Cork } } difference{ union{ object{caixa texture{Chrome_Metal}} object{caixa_vidro} object{peca rotate -180*x translate <0,0,10.4>} } object{bola_menor texture{Glass} translate <0,0,5>} } difference{ object{braco} object{caixa_menor translate <0,0,5>} } union{ object{espremedor translate <-0.2,0,3> texture{Silver_Metal}} object{bolinha translate <-0.6,0,7.7> texture{Gold_Metal}} object{bolinha translate <0.6,0,7.7> texture{Gold_Metal}} object{bolinha translate <0,-0.6,7.7> texture{Gold_Metal}} object{bolinha translate <0,0.6,7.7> texture{Gold_Metal}} } } #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 16.0; #declare dir_camera = < 7, 7, 3 >; #declare dist_camera = 46.0; #declare intens_luz = 1.40; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)