// 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.4, 0.6, 0.8 > } #declare tx_out = texture{ pigment{ color rgb < 0.10, 0.25, 0.60 > } finish{ diffuse 0.9 ambient 0.5 } } #declare tx_in = texture{ pigment{ color rgb < 0.80, 0.10, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_metal = texture{ pigment{ color rgb < 0.30, 0.30, 0.30 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_espelho = texture{ pigment{ color rgb < 0.20, 0.60, 0.20 > } finish{ diffuse 0.2 reflection 0.3*< 0.20, 0.60, 0.20 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.80, 0.80, 0.80 > filter 0.70 } finish{ diffuse 0.1 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.5, 0.4, 0.1 >, color rgb < 1, 1, 1 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare box_out = box{ <5,5,5>, <0,0,0> texture{ tx_out } } #declare box_in = box{ <4.8,4.8,5.1>, <0.2, 0.2, 0.2> texture{ tx_in } } #declare tampa_out = box {<5,5,0.2>, <0,0,0> texture{ tx_out }} #declare tampa_in = box {<4.8,4.8,0.1>, <0.2, 0.2, -0.1> texture{ tx_in }} #declare cilindro_1 = cylinder{ <0, 0, 0>, <0, 0, 7>, 0.2 } #declare cilindro_2 = cylinder{ <0, 0, 0>, <0, 0, 6>, 0.3 } #declare cilindro_3 = cylinder{ <0, 0, 0>, <0, 0, 5>, 0.4 } #declare cilindro_4 = cylinder{ <0, 0, 0>, <0, 0, 4>, 0.5 } #declare ponta = cone{ <0, 0, 0>, 0.5, <0, 0, 1>, 0 } #declare bola = sphere{ < 0.00, 0.00, 0.00 >, 0.5 } #declare chao = box{ <-25,-25,-1>, <+25,+25,0> } #declare surpresa = union{ object{ ponta translate <0,0,7.8> texture{ tx_espelho }} object{ bola translate <0,0,7.5> texture{ tx_vidro } interior { ior 1.02 }} object{ cilindro_1 texture{ tx_metal }} object{ cilindro_2 texture{ tx_metal }} object{ cilindro_3 texture{ tx_metal }} object{ cilindro_4 texture{ tx_metal }} } #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ chao texture{ tx_xadrez } } object{ surpresa rotate <-20, 0, 0> translate < 2.5,2,0 > } difference{ object{ box_out } object{ box_in } } difference{ object{ tampa_out rotate <135, 0, 0> translate <0, 0, 5> } object{ tampa_in rotate <135, 0, 0> translate <0, 0, 5> } } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 3.00 >; #declare raio_cena = 16.0; #declare dir_camera = < 15.00, 10.00, 8.00 >; #declare dist_camera = 20.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)