// 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 1*< 14.00, 8.00, 2.50 > // Posição do observador. right -0.60*x // Largura RELATIVA da imagem. up 0.60*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 1.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, +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_carro = texture{ pigment{ color rgb < 1, 1, 1 > } finish{ diffuse 0.5 reflection 0.8*<1,1,1> ambient 0.1} } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.3 ambient 0.2 } } #declare tx_mamao = texture{ pigment{ color rgb < 0.90, 0.50, 0.20 > } finish{ diffuse 0.3 ambient 0.2 } } #declare tx_olho = texture{ pigment{ color rgb < 0, 0.8, 1 > } finish{ diffuse 0.8 ambient 0.2 } } #declare tx_orelha = texture{ pigment{ color rgb < 0.2, 0.5, 0.8 > } finish{ diffuse 0.8 ambient 0.2 } } #declare tx_pele = texture{ pigment{ color rgb < 0.92, 0.83, 0.80 > } finish{ diffuse 0.6 ambient 0.2 } } #declare tx_nariz = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 1 ambient 0.2 } } #declare tx_boca = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 4 ambient 0.2 } } // ====================================================================== // DESCRIÇÃO DA CENA //#include "retalho.inc" //#include "nuvens.inc" //bg_color{} #declare P1 = <0,0,0>; #declare P2 = <0,1.5,0>; #declare P2_2 = <0,2.9,0>; #declare P3 = <0,4.5,0>; #declare P4 = <0,6,0>; #declare R1 = 1.4; #declare R2 = 3.0; #declare R3 = 1.9; #declare R4 = 2; #declare forca1 = 30; #declare forca2 = 2.5; #declare forca3 = 30; #declare forca4 = -10; #macro mamao() blob { sphere{P1, R1, forca1} sphere{P2, R2, forca2} sphere{P2_2, R2, forca2} sphere{P3, R3, forca3} sphere{P4, R4, forca4} threshold 0.5 texture{ tx_mamao } } #end #macro palma_mao() blob { sphere{ <0,0,0>, 3.2, 2 scale<0.4,0.95,0> rotate 90*y } //cylinder{ <0,0,1>, <0,0,4.5>, 0.7, 2 } //cylinder{ <0,1,1>, <0,2,3.7>, 0.7, 2 } //cylinder{ <0,-1,1>, <0,-2,3.7>, 0.7, 2 } //cylinder{ <0,1.7,0.8>, <0,3.5,2.5>, 0.7, 2 } //cylinder{ <0,-2,0.5>, <0,-4,0.8>, 0.9, 2 } //sphere{ <0,0,-1.5>, 2, 6 } threshold 0.5 texture{ tx_pele } } #end #macro dedo(dist) blob { sphere{ <0,0,0>, 1, 1 } cylinder{ <0,0,0>, <0,dist,0>, 0.5, 2 } sphere{ <0,dist,0>, 1, 1 } texture { tx_pele } } #end #macro dedo2(dist, dist2, ang_dedo) union { object{ dedo(dist2) } object{ dedo(dist) rotate ang_dedo*x translate <0,dist2,0> } } #end #macro dedo3(dist, dist2, dist3, ang_dedo, ang_dedo2) union { object{ dedo(dist3) } object{ dedo2(dist, dist2, ang_dedo) rotate ang_dedo2*x translate <0,dist3,0> } } #end #macro mao() palma_mao() object{dedo2(0.7, 1.4,45) rotate -45*z translate <2,0.5,0>} object{dedo3(0.7, 1, 1.5, 45,45) translate <1.3,1.5,0>} object{dedo3(0.7, 1, 1.5, 45,45) translate <0.3,1.8,0>} object{dedo3(0.7, 1, 1.5, 45,45) translate <-0.7,1.8,0>} object{dedo3(0.7, 1, 1.5, 45,45) translate <-1.7,1.3,0>} #end #macro mamao_mao() mao() object{ mamao() scale 0.7 rotate 90*z translate <0.5,0,1.5>} #end #macro anao() blob { sphere{ <0,0,0>, 2, 2 texture {tx_pele} } //olhos sphere{ <1.2,-0.25,0.5>, 0.25, 20 texture {tx_olho}} sphere{ <1.2,0.25,0.5>, 0.25, 20 texture {tx_olho}} //nariz sphere{ <1.25,0,0>, 0.35, 20 texture{tx_nariz}} //boca sphere{ <1,0,-0.6>, 0.35, -1.5 texture{tx_boca} } //orelhas sphere{ <0,-1.4,0.5>, 0.25, 20 texture {tx_orelha}} sphere{ <0,1.4, 0.5>, 0.25, 20 texture {tx_orelha}} threshold 0.5 } #end #macro mamao_ou_anao(F) blob { //mamao sphere{P1, R1, F*forca1 texture{tx_mamao}} sphere{P2, R2, F*forca2 texture{tx_mamao}} sphere{P2_2, R2, F*forca2 texture{tx_mamao}} sphere{P3, R3, F*forca3 texture{tx_mamao}} sphere{P4, R4, F*forca4 texture{tx_mamao}} //anao sphere{ <0,0,0>, 2, (1-F)*2 texture {tx_pele} } //olhos sphere{ <1.2,-0.25,0.5>, 0.25, (1-F)*20 texture {tx_olho}} sphere{ <1.2,0.25,0.5>, 0.25, (1-F)*20 texture {tx_olho}} //nariz sphere{ <1.25,0,0>, 0.35, (1-F)*20 texture{tx_nariz}} //boca sphere{ <1,0,-0.6>, 0.35, (1-F)*-1.5 texture{tx_boca} } //orelhas sphere{ <0,-1.4,0.5>, 0.25, (1-F)*20 texture {tx_orelha}} sphere{ <0,1.4, 0.5>, 0.25, (1-F)*20 texture {tx_orelha}} threshold 0.5 //texture { tx_pele } } #end union{ object{ eixos(3.00) } //object{mamao} //object{mao} mamao_ou_anao((1 + cos(2*pi*clock))/2) //anao() //rotate 90*x rotate 30*z //rotate 50*y }