// 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 2*<7, 1, 1> // Posição do observador. //right -0.45*x // Largura RELATIVA da imagem. right -1*x // Largura RELATIVA da imagem. //up 0.60*y // Altura RELATIVA da imagem. up y sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 0.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, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } /*light_source{ 10 * < +10.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 eixos(10) // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_1 = texture{ pigment{ color rgb < 1, 1, 1 > } finish{ diffuse 0.9 ambient 0.5 specular 0.5 roughness 0.005 } } #declare mamao = blob { sphere {<0, 0, 2>, 4, 1 scale <1, 1, 1.2>} sphere {<0, 0, 5>, 2, 0.5} #declare s = 0.4; #declare h = 5.7; #declare r = 0.5; #declare p = 0.2; sphere {, r, p} sphere {, r, p} sphere {, r, p} sphere {, r, p} sphere {, r, p} sphere {, r, p} sphere {<0, 0, 6>, 0.5, -0.1} sphere {0, 0.9, 0.1} sphere {<0, 0, -0.5>, 0.7, -0.2 scale <1, 1, 1.5>} threshold 0.5 texture {tx_1} } /*object { mamao }*/ ///////////////////////////////////////////// // Dedo ///////////////////////////////////////////// /*#declare phi = 1.6180339887; #macro falangeDistal(r, d) union { cone {0, r, <0, 0, d>, 0.9*r} sphere {<0,0,d>, 0.9*r} } #end #macro falangeMedia(a, r2, r1, d2, d1) union { cylinder {0, <0, 0, d2>, r2} sphere {<0, 0, d2>, r2} object { falangeDistal(r1, d1) rotate <0, a, 0> translate <0, 0, d2> } } #end #macro dedo(a1, a2, r3, r2, r1, d3, d2, d1) union { cylinder {0, <0, 0, d3>, r3} sphere {<0, 0, d3>, r3} object { falangeMedia(a1, r2, r1, d2, d1) rotate <0, a2, 0> translate <0, 0, d3> } } #end ///////////////////////////////////////////// // Mao ///////////////////////////////////////////// #macro mao() // Dedos // Mindinho // Anelar dedo(10, 50, 0.5, 0.4, 0.3, phi*phi, phi, 1) //rotate <0, -70, 0> //translate <-3, -1, 0> // Medio dedo(10, 45, 0.5, 0.4, 0.3, phi*phi, phi, 1) rotate <0, -80, 0> // Indicador // Dedao #end object { mao() texture {tx_1} }*/ ///////////////////////////////////////////// // Anao ///////////////////////////////////////////// #declare amarelo = texture{ pigment{ color rgb < 0.5, 0.5, 0.1 > } finish{ diffuse 0.9 ambient 0.9 specular 0.5 roughness 0.005 } } #declare azul = texture{ pigment{ color rgb 3*< 0, 0, 1 > } finish{ diffuse 0.9 ambient 0.5 specular 0.5 roughness 0.005 } } #declare vermelho = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.9 ambient 0.9 specular 0.5 roughness 0.005 } } /*blob { sphere {0, 10, 1 texture {amarelo}} // Olhos sphere {<5.1, 0, 0>, 0.8, 1 rotate <0, -20, -20> texture {azul}} sphere {<5, 0, 0>, 0.8, 1 rotate <0, -20, +20> texture {azul}} // Nariz sphere {<5, 0, 0>, 1, 1 texture {amarelo}} // Boca cylinder {<5*cos(-pi/9), 5*sin(-pi/9), 0>, <5*cos(pi/9), 5*sin(pi/9), 0>, 1, -0.5 rotate <0, 20, 0> texture {vermelho}} threshold 0.5 }*/ ///////////////////////////////////////////// // Mamao ou Anao ///////////////////////////////////////////// #declare laranja = texture{ pigment{ color rgb < 0.7, 0.5, 0.1 > } finish{ diffuse 0.9 ambient 0.9 specular 0.5 roughness 0.005 } } #macro mamao_ou_anao(f) blob { // mamao sphere {<0, 0, 2>, 4, 1*f scale <1, 1, 1.2> texture {laranja}} sphere {<0, 0, 5>, 2*f, 0.5 texture {laranja}} #declare s = 0.4; #declare h = 5.7; #declare r = 0.5; #declare p = 0.2*f; sphere {, r, p texture {laranja}} sphere {, r, p texture {laranja}} sphere {, r, p texture {laranja}} sphere {, r, p texture {laranja}} sphere {, r, p texture {laranja}} sphere {, r, p texture {laranja}} sphere {<0, 0, 6>, 0.5, -0.1*f texture {laranja}} sphere {0, 0.9, 0.1*f texture {laranja}} sphere {<0, 0, -0.5>, 0.7, -0.2*f scale <1, 1, 1.5> texture {laranja}} // anao sphere {0, 10, 1*(1-f) texture {amarelo}} // Olhos sphere {<5*(1-f), 0, 0>, 0.8, 1*(1-f) rotate <0, -20, -20> texture {azul}} sphere {<5*(1-f), 0, 0>, 0.8, 1*(1-f) rotate <0, -20, +20> texture {azul}} // Nariz sphere {<5*(1-f), 0, 0>, 1, 1*(1-f) texture {amarelo}} // Boca cylinder {<5*cos(-pi/9)*(1-f), 5*sin(-pi/9)*(1-f), 0>, <5*cos(pi/9)*(1-f), 5*sin(pi/9)*(1-f), 0>, 1, -0.5*(1-f) rotate <0, 20, 0> texture {vermelho}} threshold 0.5 } #end mamao_ou_anao((1+cos(2*clock*pi))/2)