// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2009-03-09 18:44:03 by stolfi // ====================================================================== // CÂMERA camera{ location < 14.00, 7.00, 3.50 > // Posição do observador. right -0.45*x // Largura RELATIVA da imagem. up 0.60*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 1.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.0 * < 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.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // EIXOS DE COORDENADAS #macro eixo(ponta,cor,nome) union{ sphere{ <0,0,0>, 0.02 } cylinder{ <0,0,0>, 0.91*ponta, 0.02 } cone{ 0.90*ponta, 0.06, ponta, 0.00 } texture{ pigment{ color rgb cor } finish{ ambient 0.5 diffuse 0.5 } } } #end #macro eixos(tamanho) union{ object{ eixo( , <1.0,0.2,0.2>, "X") } object{ eixo( <0,tamanho,0>, <0.0,0.8,0.0>, "Y") } object{ eixo( <0,0,tamanho>, <0.3,0.3,1.0>, "Z") } } #end // ====================================================================== // 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_branco = texture{ pigment{ color rgb < 1.0, 1.0, 1.0 > } } #declare tx_marrom = texture{ pigment{ color rgb < 0.50, 0.0, 0.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.65, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.90, 0.70 > } finish{ diffuse 0.1 reflection 0.8*< 1.00, 0.90, 0.70 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: #declare bolinha = sphere{ < 0,0,0 >, 0.60 } #declare bolota = sphere{ < 0,0,0 >, 1.50 } #declare bola_grande = sphere{ < 0.00, 0.00, 0.00 >, raio texture{ tx_plastico } } #declare bico = cylinder{ < -1.00, 0, +2.45 >, < 1.90 , 0, +2.45 >, 0.25 texture{ tx_fosca } } #declare bico_furo = cylinder{ < -1.00, 0, +2.45 >, < 2.00 , 0, +2.45 >, 0.15 texture{ tx_fosca } } #declare jarra_main = cylinder{ < 0.00, 0.00, 0.00 >, < 0.00, 0.00, +3.00 >, 0.75*raio texture{ tx_fosca } } #declare entrada_jarra = cylinder{ < 0.00, 0.00, 2.70 >, < 0.00, 0.00, +3.10 >, 0.70*raio texture{ tx_fosca } } #declare espremedor = cone{ < 0.00, 0.00, 2.50 >, 0.4* raio < 0.00, 0.00, 3.50 >, 0.04*raio texture{ tx_fosca } } #declare man1 = cylinder{ < -1.00, 0 , +2.35 >, < -2.00 , 0, +2.35 >, 0.15 texture{ tx_marrom } } #declare man2 = cylinder{ < -2.00 , 0 , +2.45 >, < -2.00 , 0 , +1.25 >, 0.15 texture{ tx_marrom } } #declare man3 = cylinder{ < -2.00, 0, +1.35 >, < -3.00 , 0, +1.35 >, 0.15 texture{ tx_marrom } } // Aqui está a cena, finalmente: #declare juicer = union { //object{ eixos(4.00) } difference { object{ jarra_main } object{ entrada_jarra } } difference { object{ bico } object{ bico_furo } } object { espremedor } object { man1 } object { man2 } object { man3 } // rotate -45 * z // rotate 15 * y } #declare fatia = box{ < 0.0, -2.0, 4.0>, < -3.0, 3.0, -1.5> texture{ tx_branco } } #declare juicer_cut = intersection { object{juicer} object{fatia} } union { object{ juicer translate< 2.5,-1.0,0> scale 0.6 rotate -45*z} object{ juicer_cut translate<-2.5, 0,0> scale 0.6 rotate -45*z} }