// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #include "textures.inc" #declare tx_plastico = texture{ pigment{ color rgb < 0.30, 0.95, 0.10 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_blue = texture{ pigment{ color rgb < 0.30, 0.5, 0.90 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_yellow = texture{ pigment{ color rgb < 1, 1, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_black = texture{ pigment{ color rgb < 0, 0, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_green = texture{ pigment{ color rgb < 0.30, 0.9, 0.20 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_marrom = texture{ pigment{ color rgb < 0.55, 0.15, 0.45 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_head = texture{ pigment{ color rgb < 0.90, 0.15, 0.10 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.75, 0.25, 0.05 > } 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 } #declare pe = box { <0,0,0> <1,3,1> texture {tx_head} } #macro canela (angulo) union { box{ <0,0,0> <1,1,-4> texture{tx_head} } object {pe rotate angulo*x translate <0,0.3,-5>} } #end #macro coxa (tornozelo,joelho) union { box { <0,0,0> <1,1,-3> texture {tx_blue} } object {canela(tornozelo) rotate joelho*x translate <0,0,-3>} } #end #declare angulo = 15 + 45*sin(3*2*pi*clock); #declare baseCorpo = sphere { <0,0,0> 3 texture {tx_plastico} } #macro corpo(tamanho) union { #declare i=0; #while (i} #declare i=i+1; #end } #end #macro chassis(tornozelo,joelho,juntaCorpo) union{ object {baseCorpo} object {coxa(tornozelo,joelho) rotate juntaCorpo*x translate<2,0.5,-1.5>} object {coxa(tornozelo,joelho) rotate juntaCorpo*x translate<-2,0.5,-1.5>} } #end #macro interpola(ta,va,tb,vb,tt) #local s=(tt-ta)/(tb-ta); ((1-s)*va +s*vb) #end #declare t0=0.000; #declare t1=0.250; #declare t2=0.500; #declare t3=0.750; #declare t4=1.000; #if ((clock >= t0) & (clock<=t1)) #declare tornozelo = interpola (t0,30,t1,45,clock); #declare joelho = interpola (t0,-45,t1,-90,clock); #declare juntaCorpo = interpola (t0,15,t1,30,clock); #end #if ((clock >= t1) & (clock<=t2)) #declare tornozelo = interpola (t1,45,t2,0,clock); #declare joelho = interpola (t0,-90,t1,0,clock); #declare juntaCorpo = interpola (t1,30,t2,0,clock); #end #if ((clock >= t2) & (clock<=t3)) #declare tornozelo = interpola (t2,0,t3,0,clock); #declare joelho = interpola (t2,0,t3,-30,clock); #declare juntaCorpo = interpola (t2,0,t3,15,clock); #end #if ((clock >= t3) & (clock<=t4)) #declare tornozelo = interpola (t3,0,t4,30,clock); #declare joelho = interpola (t3,-30,t4,-60,clock); #declare juntaCorpo = interpola (t3,15,t4,30,clock); #end union{ object {chassis(tornozelo,joelho,juntaCorpo) translate <2*sin(2*pi*clock),3*cos(2*pi*clock),5>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 15.0; #declare dir_camera = < 8.00, 10.00, 10 >; #declare dist_camera = 60.0; #declare intens_luz = 2.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)