// 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_pele = texture{ pigment{ color rgb < 0.70, 0.70, 0.70 > } } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #include "textures.inc" #declare parte_perna = cylinder{ <0, 0, -5>, <0, 0, 0>, 0.5 texture{ tx_pele } } #declare artic_perna = sphere{ <0, 0, 0>, 0.5 texture{ tx_pele } } #declare pe = sphere{ <0, 0, 0>, 0.15 texture{ tx_pele } } #macro perna_inf(a) union{ object{artic_perna} object{parte_perna} object{artic_perna translate<0, 0, -5>} object{pe scale<6, 20, 1> translate<0, 2.25, 0> rotate<-a, 0, 0> translate<0, 0, -5.5>} } #end #macro perna(a1, a2) union{ object{perna_inf(a2) rotate<-a1, 0, 0> translate<0, 0, -5>} object{parte_perna} object{artic_perna} } #end #declare parte_braco = cylinder{ <0, 4, 0>, <0, 0, 0>, 0.4 texture{ tx_pele } } #declare artic_braco = sphere{ <0, 0, 0>, 0.4 texture{ tx_pele } } #declare mao = sphere{ <0, 0, 0>, 0.8 texture{ tx_pele } } #declare braco_inf = union{ object{artic_braco} object{parte_braco} object{mao scale<1, 0.75, 0.75> translate<0,4,0>} } #macro braco(a) union{ object{braco_inf scale<1, 0.9, 1> rotate<0, 0, -a> translate<0,4,0>} object{parte_braco} object{artic_braco} } #end #declare pescoco = cylinder{ <0, 0, 2>, <0, 0, 0>, 0.5 texture{ tx_pele } } #declare cabeca = sphere{ <0, 0, 0>, 2 texture{ tx_pele } } #declare tronco = sphere{ <0, 0, 0>, 2 texture{ tx_pele } } #declare chapeu = union{ cylinder{<0, 0, 0.2>, <0, 0, 0>, 3.5 pigment{ color rgb <0, 0, 0> }} cylinder{<0, 0, 2>, <0, 0, 0>, 1.75 pigment{ color rgb <0, 0, 0> }} } #macro corpo(apd1, apd2, apd3, apd4, ape1, ape2, ape3, ape4, abd1, abd2, abd3, abd4, abe1, abe2, abe3, abe4) union{ object{perna(apd3, apd4) rotate translate<2, 0, 0>} object{perna(ape3, ape4) rotate translate<-2, 0, 0>} object{braco(-abd4) rotate translate<1, 0, 10>} object{braco(abe4) rotate translate<-1, 0, 10>} object{tronco scale<1.5, 1, 3.25> translate<0, 0, 4.5>} object{pescoco translate<0, 0, 10>} object{cabeca translate<0, 0, 13.5>} object{chapeu translate<0, 0, 14.5>} } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{corpo(10, 0, 0, 0, 10, 0, 0, 0, 90, 90, 0, 90, 90, 90, 0, 90) translate<-10, 0, 0>} object{corpo(5, -20, 35, 10, 5, 25, 40, -5, 20, 70, 15, 70, 150, -80, -10, 50) translate<10, 0, 0>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00,2.00 >; #declare raio_cena = 30.0; #declare dir_camera = < 0.00, 20.00, 5.00 >; #declare dist_camera = 30.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)