// 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_1 = texture{ pigment{ color rgb < 2.10, 0.00, 0.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_2 = texture{ pigment{ color rgb < 0.75, 0.54, 0.06 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA #macro antebraco () union { cylinder{ < 0.00, 0.00, 0.0 >, < 0.0, 0.00, 1.40 >, 0.37 texture { tx_2 } } sphere{ < 0,0,1.50 >, 0.45 texture { tx_2 } } } #end #macro braco (a) union { cylinder{ < 0.00, 0.00, 0.0 >, < 0.00, 0.00, 1.5 >, 0.4 texture { tx_2 } } object { antebraco() rotate<0,a,0> translate<0,0,1.5>} } #end #macro corpo (braco_esq, braco_dir, ante_esq, ante_dir, coxa_esq, coxa_dir, perna_esq, perna_dir, pe_esq, pe_dir) union{ cone{ < 0.00, 0.00, 0.00 >, 2.5 < 0.00, 0.00, 5.00 >, 1 texture { tx_1 } } cone{ < 0.00, 0.00, 7.5 >, 1.2 < 0.00, 0.00, 10.00 >, 0 texture { tx_1 } } sphere{ < 0,0,0 >, 1.5 translate <0,0,6.5> texture { tx_2 } } cylinder{ < 0.00, 0.00, 6.5 >, < 0.00, 4.00, 6.5 >, 0.2 texture { tx_2 } } object { braco(ante_esq) rotate< 0,braco_esq,0> translate<1,0,4>} object { braco(ante_dir) rotate< 0,braco_dir,0> translate<-1,0,4>} object { coxa(perna_esq, pe_esq) rotate< 0,coxa_esq,0> translate<1,0,0>} object { coxa(perna_dir, pe_dir) rotate< 0,coxa_dir,0> translate<-1,0,0>} } #end #macro coxa (a,b) union{ cylinder{ < 0.00, 0.00, 0.0 >, < 0.0, 0.00, -1.40 >, 0.5 texture { tx_2 } } object { perna(b) rotate< 0,a,0> translate<0,0,-1.4>} } #end #macro perna (a) union { cylinder{ < 0.00, 0.00, 0.0 >, < 0.0, 0.00, -1.40 >, 0.45 texture { tx_2 } } object { peh() rotate<0,a,0> translate<0,0,-1.40> } } #end #macro peh () cylinder{ < -1, 0.00, 0.0 >, < 1, 0.00, 0.0 >, 0.45 texture { tx_2 } } #end // Aqui está a cena, finalmente: union { object { corpo(45,-90,90,-90, 30,30,30,30,30,30)translate<-6,0,0>} object { corpo(30,-45,-45,-90, -30,45,-30,30,15,0) translate<6,0,0>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 20.0; #declare dir_camera = < 0.00, 5.00, 0.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)