// Last edited on 2010-12-16 01:20:45 by stolfilocal // Processed by remove-cam-lights #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_verde = texture{ pigment{ color rgb < 0.10, 1.00, 0.10 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_branco = texture{ pigment{ color rgb < 1.0, 1.00, 1.0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_preto = texture{ pigment{ color rgb < 0.0, 0.00, 0.0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vermelho = texture{ pigment{ color rgb < 1.00, 0, 0 > } 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_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 } #include "textures.inc" #include "eixos.inc" #declare corpo = union { sphere{<-0.6,0,0> 1 texture{tx_fosca}} cylinder{<-0.7,0,0>, <0.7,0,0> 1 texture{tx_fosca} } sphere{<0.6,0,0> 1 texture{tx_fosca}} } #declare pescoco = cylinder {<0.8,0,1>,<1.3,0,1.6> 0.2 texture{tx_vermelho}} #declare cabeca = sphere{<1.8,0,2.3> 0.8 texture{tx_fosca}} #declare bico = cone{ <2.6,0,2.3>, 0.2 <3.3,0,2.3>, 0 texture{tx_vermelho} } #macro pe() union{ box{<0,0,-1.1> <0.6, 0.3,-1.3>} box{<0,-0.9,-1.1> <0.6,-1.2,-1.3>} } #end //end of pe #macro anteperna (alph) union { cylinder{<0, 0, 0> <0,0,-1.1> 0.2 texture{tx_vermelho} } cylinder{<0, -1.3, 0> <0,-1.3,-1.1> 0.2 texture{tx_vermelho} } object{pe() rotate y*alph translate<0.1,-0.1,0.1> } } #end //end of anteperna #macro perna(alph,beta) union { cylinder{ <0, 0, 0>, <0,0,-0.8>, 0.2 texture{tx_vermelho} } cylinder{<0,-1.2,0> <0,-1.2,-0.8> 0.2 texture{tx_vermelho}} object{ anteperna(alph) rotate y*beta translate <0,0,-0.8>} } #end //end of perna #macro galinha(alph,beta,gama) union{ object{pescoco} object{corpo} object{cabeca} object{bico} object{perna(alph,beta) rotate y*gama translate<0,0.6,-0.6> } } #end//end of galinha #declare t0=0; #declare t1=0.25; #declare t2=0.5; #declare t3=0.75; #declare t4=1; #declare alph0=0; #declare alph1=10; #declare alph2=15; #declare alph3=10; #declare alph4=0; #declare beta0=45; #declare beta1=30; #declare beta2=0; #declare beta3=30; #declare beta4=45; #declare gama0=-45; #declare gama1=-20; #declare gama2=0; #declare gama3=-20; #declare gama4=-45; #macro interpola(ta,va,tb,vb,tt) #local s = (tt-ta)/(tb-ta); ((1-s)*va+s*vb) #end #declare altura0=2; #declare altura1=6; #declare altura2=10; #declare altura3=14; #if ((clock >= t0) & (clock <= t1)) #declare alph = interpola(t0,alph0,t1,alph1,clock); #declare beta = interpola(t0,beta0,t1,beta1,clock); #declare gama = interpola(t0,gama0,t1,gama1,clock); #declare altura = altura0*sin(2*pi*clock); #end #if ((clock > t1) & (clock <= t2)) #declare alph = interpola(t1,alph1,t2,alph2,clock); #declare beta = interpola(t1,beta1,t2,beta2,clock); #declare gama = interpola(t1,gama1,t2,gama2,clock); #declare altura = altura1*sin(2*pi*clock); #end #if ((clock > t2) & (clock <= t3)) #declare alph = interpola(t2,alph2,t3,alph3,clock); #declare beta = interpola(t2,beta2,t3,beta3,clock); #declare gama = interpola(t2,gama2,t3,gama3,clock); #declare altura = altura2*sin(2*pi*clock); #end #if ((clock > t3) & (clock <= t4)) #declare alph = interpola(t3,alph3,t4,alph4,clock); #declare beta = interpola(t3,beta3,t4,beta4,clock); #declare gama = interpola(t3,gama3,t4,gama4,clock); #declare altura = altura3*sin(2*pi*clock); #end background{ color rgb < 0.75, 0.80, 0.85 > } #declare degrauPequeno = box{<-1,-1,0>,<1,1,2> texture{tx_plastico} } #declare degrauGrande = box{<-1,-1,0>,<1,1,7> texture{tx_plastico} } #declare bolinha = sphere{<0,0,0> 1 texture{tx_vermelho}} #macro armacao(fase) union { #local fase0=0; #local fase1=0.25; #local fase2=1; #if ((fase>=fase0) & (fase<=fase1)) object{galinha(alph,beta,gama) translate <0,0,5.4+sin(3 + 2*pi*clock)>} #end #if ((fase>fase1) & (fase <=fase2)) object{galinha(alph,beta,gama) translate <0,0,5.4+sin(3 + 2*pi*clock)>} #end #if (fase>fase2) object{galinha(alph,beta,gama) translate <0,0,5.4+sin(3 + 2*pi*clock)>} #end } #end #macro voo(h,fase) union{ #local fase0=0; #local fase1=0.75; #local fase2=1.0; #if ((fase>=fase0) & (fase<=fase1)) object{galinha(alph,beta,gama) translate <0,0,5.4+sin(3 + 2*pi*clock)>} #end #if ((fase>fase1) & (fase <=fase2)) object{galinha(alph,beta,gama) translate <0,0,5.4+sin(3 + 2*pi*clock)>} #end #if (fase>fase2) object{galinha(alph,beta,gama) translate <0,0,5.4+sin(3 + 2*pi*clock)>} #end } #end #macro armacaoGeral(p,fase) object{armacao(fase) translate p} #end #macro vooGeral(altura,p,q,fase) #local r = interpola(0,p,1,q,fase); object{voo(altura,fase) translate r} #end box{<-30,-30,0>,<30,30,0> texture{tx_xadrez}} object{degrauPequeno} object{degrauGrande translate <8,0,0>} object{degrauPequeno translate<16,0,0>} object{eixos(3)} #macro quadro(tt) #local t0 = 0; #local t1 = 0.25; #local t2 = 0.5; #local t3 = 0.75; #local t4 = 1; #local A=<0,0,0>; #local B=<8,0,0>; #local C=<16,0,0>; #if ((tt>=t0)&(tt<=t1)) #local fase = interpola(t0,0,t1,1,tt); object{armacaoGeral(A,fase)} #end #if ((tt>t1)&(tt<=t2)) #local fase = interpola(t1,0,t2,1,tt); object{vooGeral(altura,A,B,fase)} #end #if ((tt>t2)&(tt<=t3)) #local fase = interpola(t2,0,t3,1,tt); object{armacaoGeral(B,fase)} #end #if ((tt>t3)&(tt<=t4)) #local fase = interpola(t3,0,t4,1,tt); object{vooGeral(altura,B,C,fase)} #end #end quadro(clock) #include "camlight.inc" #declare centro_cena = < 8.00, 2.00, 1.00 >; #declare raio_cena = 20.0; #declare dir_camera = < 0.00, 4.00, 2.00 >; #declare dist_camera = 30.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)