// Last edited on 2019-07-17 11:12:59 by stolfilocal // Processed by remove-cam-lights #include "pontos.inc" background{ color rgb < 0.75, 0.80, 0.85 > } #declare Yellow = rgb<255, 255, 0>; #declare Black = rgb < 0.4, 0.4, 0.4 >; #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 esfera = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_plastico } } #include "eixos.inc" #include "pontos.inc" object{ eixos(3.00) } #macro Pe(L1) cylinder{ <0,0,0>, <0,L1,0>, 0.5 texture{tx_plastico} } #end #macro canelaPe(L1, L2, al) union{ object{ Pe(L1) rotate translate<0,L2,0>} object{ sphere{ < 0.00, L2, 0.00 >, 0.5 texture{ tx_plastico } } } object{ cylinder{ <0,0,0>, <0,L2,0>, 0.5 texture{tx_plastico} } } } #end #macro joelho(L1, L2, L3, al, be) union{ object{canelaPe(L1, L2, al) rotate translate<0, L3, 0>} object{ sphere{ < 0.00, L3, 0.00 >, 0.5 texture{ tx_plastico } } } object{ cylinder{ <0,0,0>, <0,L3,0>, 0.5 texture{ tx_plastico } } } } #end #macro perna(L1, L2, L3, al, be, ga) union{ object{joelho(L1, L2, L3, al, be) rotate<(ga-90),0,0>} } #end #macro interpola(to, vo, t1, v1, tt ) #local r = (tt-to)/(t1-to); #local s = 1-r; #local vv= s*vo+r*v1; vv #end #declare nk= 3; #declare tk = array[nk]; #declare tk[0]= 0.3334; #declare tk[1]= 0.5001; #declare tk[2]= 1.0; #macro busca_tempo(clk, nk, tk) #local res = 0; #for(k, 0, nk-2) #if((clk >= tk[k]) & (clk <= tk[k+1])) #local res = k; #end #end res #end #macro dragao(A) union{ sphere{ < 0, -2, 2 >, 5 texture{ tx_plastico } } object{perna(1, 2, 4, A[0][0], A[0][1], A[0][2])} object{perna(1, 2, 4, A[1][0], A[1][1], A[1][2]) translate<4,0,0>} object{perna(1, 2, 4, A[2][0], A[2][1], A[2][2]) translate<4,-4,0>} object{perna(1, 2, 4, A[3][0], A[3][1], A[3][2]) translate<0,-4,0>} } #end #macro interpola_quadros(NP, NA, Q, k0, t0, k1, t1, cc, As) #local i = 0; #while(i < NP) #local k = 0; #while(k; #declare raio_cena = 15.0; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)