// 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_perna = texture{ pigment{ color rgb < 139/255, 69/255, 19/255 > } finish{ diffuse 0.8 ambient 0.5 specular 0.5 roughness 0.005 } } #declare tx_pele = texture{ pigment{ color rgb < 210/255, 105/255, 30/255 > } finish{ diffuse 0.8 ambient 0.5 specular 0.5 roughness 0.005 } } #declare tx_folha = texture{ pigment{ color rgb < 0.1, 1, 0.1 > } finish{ diffuse 0.8 ambient 0.5 specular 0.5 roughness 0.005 } } #include "math.inc" // ====================================================================== // DESCRIÇÃO DA CENA #macro boneco(Be, Bd, ABe, ABd, Cxe, Cxd, Ce, Cd, Pe, Pd) union { object{ corpo() } object{ braco(ABe*y) //braco esquerdo rotate Be*y translate <-6,0,8> } object{ braco(-ABd*y) //braco direito rotate -Bd*y translate <6,0,8> } object{ coxa(Ce*x, Pe*x) rotate Cxe*x translate <-4,0,0> } object{ coxa(Cd*x, Pd*x) rotate Cxd*x translate <4,0,0> } } #end #macro corpo() union{ cylinder{ <0,0,10>, <0,0,11>, 1 //pescoco texture{tx_pele} } sphere { <0,0,14>, 3 //cabeca texture{tx_pele} } cylinder {<0,0,14>, <0,7,14>, 0.35 //nariz texture{tx_pele} } cylinder {<-1,2,15>, <-1,2.8,15>, 0.3} //olho1 cylinder {<1,2,15>, <1,2.8,15>, 0.3} //olho2 cylinder{ <0,0,0>, <0,0,10>, 5 //corpo texture{tx_pele} } sphere { <6,0,9>, 2 //ombro1 texture{tx_pele} } sphere { <-6,0,9>, 2 //ombro2 texture{tx_pele} } cone { <-2,0,16>, 1, <-3.5,0,17.5>, 0 //orelha1 texture{tx_pele} } cone { <2,0,16>, 1, <3.5,0,17.5>, 0 //orelha2 texture{tx_pele} } } #end #macro pe() box{ <-1.2,4,-1> , <1.2,-1,0> } #end #macro canela(RotacaoP) union { cylinder{ <0,0,0>, <0,0,-6>, 1.2 } object{ pe() rotate RotacaoP translate <0, 0, -6> } } #end #macro coxa(RotacaoC, RotacaoP) union { cylinder{ <0,0,0>, <0,0,-7>, 1 texture{tx_pele} } object{ canela(RotacaoP) rotate RotacaoC translate <0, 0, -7> } } #end #macro braco(Rotacao) union { cylinder{ <0,0,0>, <0,0,-4>, 1 texture{tx_pele} } object{ antebraco() rotate Rotacao translate <0,0,-4> } } #end #macro antebraco() union { cylinder{ <0,0,0>, <0,0,-5>, 1 texture{tx_pele} } sphere { <0,0,-6>, 1 texture{tx_pele} } } #end #declare raio = 10.000; #include "eixos.inc" // Aqui está a cena, finalmente: union{ object {eixos(15.00) } object {boneco(30, 30, -30, -10, 0, 30, -30, -30, 20, 0) translate <10,0,0> } object {boneco(120, 30, 50, -10, 40, -30, -50, -45, -10, 30) translate <-10, 0, 0> } //boneco(Be, Bd, ABe, ABd, Cxe, Cxd, Ce, Cd, Pe, Pd) } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 6.00 >; #declare raio_cena = 40.0; #declare dir_camera = < 2.00, 10.00, 0.00 >; #declare dist_camera = 35.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)