// 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{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_2 = texture{ pigment{ color rgb < 0.10, 0.80, 1.60 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_3 = texture{ pigment{ color rgb < 2.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_4 = texture{ pigment{ color rgb < 0.10, 1.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_5 = texture{ pigment{ color rgb < 0.55, 0.24, 0.06 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare cabo = cylinder{ < 0.00, 0.00, 0.00 >, < 0.00, 0.00, 7.00 >, 0.5 } #declare garras = cylinder{ < 0.00, 1.00, 0.00 >, < 0.00, -1.00, 0.00 >, 1 } #declare buraco = cylinder{ < 0.00, 1.01, 0.00 >, < 0.00, -1.01, 0.00 >, 0.6 } #declare abertura = cylinder{ < 0.00, 1.01, 0.00 >, < 0.00, -1.01, 0.00 >, 0.6 } #declare movel = cylinder{ < 0.00, 1.01, 0.00 >, < 0.00, -1.01, 0.00 >, 0.4 } #declare biscoito = torus{ 0.5, 0.3} // Funcao do objeto pegador de biscoito #macro pegador (abertura) union{ object{ cabo texture{ tx_2 }} difference { difference { object{ garras translate<0,0,8> texture { tx_1 }} object{ buraco translate<0,0,8> texture { tx_1 }} } cylinder{ < 0.00, 1.01, 0.00 >, < 0.00, -1.01, 0.00 >, abertura translate<0,0,8.7> texture { tx_1 } } } object{ movel translate<0,0,7.3> texture { tx_3 }} } #end // Aqui está a cena, finalmente: object{ pegador(0.5)} object{ pegador(0.7) translate< -4,0,0>} object{ pegador(0.33) translate< 4,0,0>} object{ biscoito translate<0,0,9> rotate 90*z texture { tx_5 } } object{ biscoito rotate 90*z translate<-4,0,9> texture { tx_5 } } object{ biscoito rotate 90*z translate<4,0,9> texture { tx_5 } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 4.00 >; #declare raio_cena = 14.0; #declare dir_camera = < 0.00, 7.00, 3.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)