// 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_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_branca = texture{ pigment{ color rgb < 2, 2, 2> } } #declare tx_preta = texture{ pigment{ color rgb < 0, 0, 0> } } #declare tx_orelha = texture{ pigment{ color rgb < 0.80, 0.80, 0.8 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA #include "eixos.inc" // COELHO DE BOTAS!111111!!! #declare raio_cabeca = 0.5; #declare raio_olho = 0.2*raio_cabeca; #macro cranio(xc,yc,zc) difference { sphere { , raio_cabeca } box { , } } #end #macro orelha(xc,yc,zc) box { texture{tx_orelha} } #end #macro cabeca(xc,yc,zc) union { cranio(xc,yc,zc) box { texture{tx_orelha} } box { texture{tx_orelha} } box { texture{tx_preta} } box { texture{tx_branca} } box { texture{tx_branca} } sphere { raio_olho texture{tx_branca} } sphere { raio_olho texture{tx_branca} } } #end #declare rjunta = 0.15; #macro junta(xc,yc,zc) sphere { rjunta } #end #declare gpe = 0.15; #declare hpe = 0.3; #macro pe(xp,yp,zp,rot) union { box { } box { } translate<-xp,-yp+gpe,0> rotate<0,0,rot> translate } #end #declare lcorpo = 2.5*raio_cabeca; #declare hcorpo = 2; #macro corpo(xc,yc,zc) union { box { } } #end #declare ltotalperna = 0.7; #declare ltotalabraco = 0.5; #macro abraco(xc,yc,zc,rab,rb) union { cylinder{ 0.5*rjunta } junta(xc,yc+ltotalabraco,zc) braco(xc,yc+ltotalabraco+rjunta,zc,rb) translate<-xc,-yc,0> rotate<0,0,rab> translate } #end #macro braco(xc,yc,zc,rb) union { cylinder{ 0.5*rjunta } translate<-xc,-yc,0> rotate<0,0,rb> translate } #end #macro coxa(xc,yc,zc,rab,rb) union { cylinder{ 0.5*rjunta } junta(xc,yc,zc-ltotalperna) perna(xc,yc,zc-ltotalperna-rjunta,rb) translate<-xc,0,-zc> rotate<0,rab,0> translate } #end #macro perna(xc,yc,zc,rb) union { cylinder{ 0.5*rjunta } translate<-xc,0,-zc> rotate<0,rb,0> translate } #end #macro coelho_de_botas(xcorpo,ycorpo,zcorpo,rotpe_esq,rotpe_dir,r_ab_dir, r_b_dir,r_ab_esq,r_b_esq,rce,rpe,rcd,rpd) union { cabeca(xcorpo,ycorpo+lcorpo/2,zcorpo+raio_cabeca) corpo(xcorpo,ycorpo,zcorpo) union { pe(xcorpo,ycorpo+lcorpo/6,zcorpo-hcorpo-2*ltotalperna-rjunta,rotpe_esq) translate <-xcorpo,0,-zcorpo+hcorpo+2*ltotalperna+rjunta> rotate<0,rpd,0> translate } union{ pe(xcorpo,ycorpo+lcorpo-lcorpo/6,zcorpo-hcorpo-2*ltotalperna-rjunta,rotpe_dir) translate <-xcorpo,0,-zcorpo+hcorpo+2*ltotalperna+rjunta> rotate<0,rpe,0> translate } junta(xcorpo-rjunta,ycorpo-rjunta,zcorpo-rjunta)//besq junta(xcorpo-rjunta,ycorpo+rjunta+lcorpo,zcorpo-rjunta)//bdir junta(xcorpo-rjunta,ycorpo+rjunta,zcorpo-hcorpo-rjunta) junta(xcorpo-rjunta,ycorpo+lcorpo-rjunta,zcorpo-hcorpo-rjunta) //braco direito abraco(xcorpo-rjunta,ycorpo+2*rjunta+lcorpo,zcorpo-rjunta,r_ab_dir,r_b_dir) //braco esq union{ abraco(xcorpo-rjunta,ycorpo+2*rjunta,zcorpo-rjunta,r_ab_esq,r_b_esq) scale<1,-1,1> } //perna esq coxa(xcorpo-rjunta,ycorpo+rjunta,zcorpo-hcorpo-2*rjunta,rce,rpe) //perna dir coxa(xcorpo-rjunta,ycorpo+lcorpo-rjunta,zcorpo-hcorpo-2*rjunta,rcd,rpd) } #end // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object{ coelho_de_botas(0,0,0,-20,20,-45,-65,-15,0,25,0,0,-25) texture{tx_fosca} } union { object{ coelho_de_botas(0,0,0,20,-20,0,0,-35,-15,-25,-25,0,0) texture{tx_fosca} } translate<0,-5,0> } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 14; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)