// Last edited on DATE TIME by USER // Processed by remove-cam-lights 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_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_vermelho = texture{ pigment{ color rgb < 1.00, 0, 0 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_verde = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare raio = 1.000; #include "eixos.inc" #macro interpola(f0,v0,f1,v1,f) #local ss=(f-f0)/(f1-f0); #local rr=1-ss; (rr*v0 +ss*v1) #end #macro interpola4(t0,v0,v1,v2,v3,t3,tt) #local v01 = interpola(t0,v0,t3,v1,tt); #local v12 = interpola(t0,v1,t3,v2,tt); #local v23 = interpola(t0,v2,t3,v3,tt); #local v012 = interpola(t0,v01,t3,v12,tt); #local v123 = interpola(t0,v12,t3,v23,tt); interpola(t0,v012,t3,v123,tt); #end #macro grafico(x0,y0,y1,y2,y3,x3,tt) #local yy1 = interpola4(x0,y0,y1,y2,y3,x3,tt); #local yy2 = interpola4(x0,y0,y1,y2,y3,x3,tt+0.01); #local yy3 = interpola4(x0,y0,y1,y2,y3,x3,tt+0.02); #local yy4 = interpola4(x0,y0,y1,y2,y3,x3,tt+0.03); object{ sphere { yy1, 0.30 } texture { tx_vermelho } translate <-3,0,2.5>} object{ sphere { yy2, 0.30 } texture { tx_vermelho } translate <-3,0,2.5>} object{ sphere { yy3, 0.30 } texture { tx_vermelho } translate <-3,0,2.5>} object{ sphere { yy4, 0.30 } texture { tx_vermelho } translate <-3,0,2.5>} #end #macro grafico2(x0,y0,y1,y2,y3,x3,N) #local delta = (x3-x0)/N; #local i = 0; #local xx = x0; #while(i <= N) #local yy = interpola4(x0,y0,y1,y2,y3,x3,xx); object{ sphere { yy, 0.10 } texture { tx_plastico } translate <-3,0,2.5>} #local xx = xx + delta; #local i = i + 1; #end #end #macro grafico5(x0,y1,y2,h1,h2,u1,u2,p1,p2,x1,n) #local h0 = (h1+y2)/2; #local y3=h0; #local u0 = (u1+h2)/2; #local h3=u0; #local p0 = (p1+u2)/2; #local u3=p0; #local y0 = (y1+p2)/2; #local p3 = y0; #local k = (x1-x0)/4; grafico2(x0,y0,y1,y2,y3,x0+k,n) grafico2(x0+k,h0,h1,h2,h3,x0+k*2,n) grafico2(x0+k*2,u0,u1,u2,u3,x0+k*3,n) grafico2(x0+k*3,p0,p1,p2,p3,x0+k*4,n) #end #macro grafico4(x0,y1,y2,h1,h2,u1,u2,p1,p2,x1,n,tt) #local h0 = (h1+y2)/2; #local y3=h0; #local u0 = (u1+h2)/2; #local h3=u0; #local p0 = (p1+u2)/2; #local u3=p0; #local y0 = (y1+p2)/2; #local p3 = y0; #local k = (x1-x0)/4; #if(tt,<5,3,1>,<1,-5,-4>,<-4,1,4>,<4,3,2>,<-4,-1,1>,<4,-3,2>,<-5,-4,1>,1,400,clock) grafico5(0,<3,-2,5>,<5,3,1>,<1,-5,-4>,<-4,1,4>,<4,3,2>,<-4,-1,1>,<4,-3,2>,<-5,-4,1>,5,400) } #include "camlight.inc" #declare centro_cena = < 1.00, 1.00, 1.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 0.00, -2.00, 0 >; #declare dist_camera = 80.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)