// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2022-01-06 05:38:45 by stolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.5, 0.5, 1 > } #declare tx_dirt = texture{ pigment{ color rgb < 0.2, 0.2, 0.2 > } finish{ diffuse 0.8 reflection 0.25 ambient 0.0 specular 0.5 roughness 0.1} } #declare tx_trunk = texture{ pigment{ color rgb < 0.5, 0.2, 0.1 > } finish{ diffuse 0.8 ambient 0.0 specular 0.5 roughness 0.8} normal { bumps 1 scale .05 } } #declare tx_leaf = texture{ pigment{ color rgb < 0.4, 1, 0.2 > } finish{ diffuse 0.8 ambient 0.0 specular 0.5 roughness 0.5} } #declare tx_ground = texture{ pigment{ color rgb < 0.7, 0.6, 0.2 > } finish{ diffuse 0.8 specular 0.9 roughness 0.1} normal { bumps 0.1 scale 1 } } #declare tx_clank_dark_gray = texture{ pigment{ color rgb < 0.1, 0.1, 0.1 > } finish{ diffuse 0.8 specular 0.5 roughness 0.1} } #declare tx_clank_light_gray = texture{ pigment{ color rgb < 0.5, 0.5, 0.5 > } finish{ diffuse 0.8 specular 0.5 roughness 0.1} } #declare tx_clank_mid_gray = texture{ pigment{ color rgb < 0.2, 0.2, 0.2 > } finish{ diffuse 0.8 specular 0.5 roughness 0.1} } #declare tx_eye = texture{ pigment{ color rgb < 1, 0.2, 0.2 > } finish{ diffuse 1 ambient 0.5 specular 0.5 roughness 0.1} } #declare tx_fire = texture{ pigment{ color rgb < 1.000, 0.650, 0.200 > } finish{ diffuse 0.1 ambient 0.9 } } #declare tx_fire_red= texture{ pigment{ color rgb < 1.000, 0.450, 0.200 > } finish{ diffuse 0.1 ambient 0.9 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 1 specular 0.25 roughness 0.005 } } // ====================================================================== // DESCRICAO DA CENA #declare ground = box{ <-400,-400,-1>, <+400,+400,0> texture{ tx_ground } } #macro clank_chin(head_angle) object{ union{ difference { sphere { <0, 0, 0>, 0.05 // , radius texture{ tx_clank_light_gray} scale <1,1,1.2> } box { <2, 2, 2>, <-1,-1, 0.0> // near lower left corner, far upper right corner texture{ tx_clank_dark_gray} } } // neck cylinder { <0, 0, -0.04>, <0, 0, -0.09>, 0.01 // center of one end, center of other end, radius texture{ tx_clank_dark_gray} } object { clank_forehead() rotate <0, -head_angle, 0> translate <-0.05,0, 0> } } translate <0, 0, 0.05*1.2> // } #end #macro clank_forehead() object { union { difference { sphere { <0, 0, 0>, 0.05 // , radius texture{ tx_clank_light_gray} scale <1,1,1.2> } box { <-2, -2, -2>, <2,2, 0.0> // near lower left corner, far upper right corner texture{ tx_clank_dark_gray} } } // Eye Right cylinder { <0, 0.025, 0.025>, <0.05, 0.025, 0.025>, 0.015 // center of one end, center of other end, radius texture{ tx_clank_mid_gray} } sphere { <0.05, 0.025, 0.025>, 0.013 // , radius texture{ tx_eye} } // Eye Left cylinder { <0, -0.025, 0.025>, <0.05, -0.025, 0.025>, 0.015 // center of one end, center of other end, radius texture{ tx_clank_mid_gray} } sphere { <0.05, -0.025, 0.025>, 0.013 // , radius texture{ tx_eye} } } translate <0.05, 0, 0> } #end #macro clank_top_falange() object{ union { box { <-0.0095, 0, -0.005>, <0.0095, 0.01, 0.005> // near lower left corner, far upper right corner texture{ tx_clank_dark_gray} } box { <-0.01, 0.01, -0.005>, <0.01, 0.02, 0.005> // near lower left corner, far upper right corner texture{ tx_clank_mid_gray} } } } #end #macro clank_bot_falange(top_falange_angle) object{ // create finger middle union { box { <-0.0095, 0, -0.005>, <0.0095, 0.01, 0.005> // near lower left corner, far upper right corner texture{ tx_clank_dark_gray} } box { <-0.01, 0.01, -0.005>, <0.01, 0.02, 0.005> // near lower left corner, far upper right corner texture{ tx_clank_mid_gray} } // append top falange object { clank_top_falange() rotate // translate <0, 0.02, 0> // } } } #end #macro clank_hand(thumb_bot_falange_angle, thumb_top_falange_angle, f1_bot_falange_angle, f1_top_falange_angle, f2_bot_falange_angle, f2_top_falange_angle) object{ union { // create hand object { box { <-0.02, 0, -0.005>, <0.02, 0.04, 0.005> // near lower left corner, far upper right corner texture{ tx_clank_light_gray} } } // append fingers object{ union { // Finger 1 object { clank_bot_falange(f1_top_falange_angle) rotate // translate <-0.01, 0.04, 0> // } // Finger 2 object { clank_bot_falange(f2_top_falange_angle) rotate // translate <0.01, 0.04, 0> // } // Thumb object { clank_bot_falange(thumb_top_falange_angle) scale <1.1, 0.5, 1> rotate // translate <0.02, 0.01, 0> // } } } } } #end #macro clank_forearm(hand_angle, thumb_bot_falange_angle, thumb_top_falange_angle, f1_bot_falange_angle, f1_top_falange_angle, f2_bot_falange_angle, f2_top_falange_angle) object{ union { // create forearm object { union{ cylinder { <0, 0, -0.0045>, <0, 0, 0.0045>, 0.006 // center of one end, center of other end, radius texture{ tx_clank_light_gray} } cylinder { <0, 0, -0.0055>, <0, 0, 0.0055>, 0.005 // center of one end, center of other end, radius texture{ tx_clank_dark_gray} } cylinder { <0, 0, 0>, <0, 0.03, 0>, 0.004 // center of one end, center of other end, radius texture{ tx_clank_dark_gray} } } } // append fingers object{ // hand object { clank_hand( thumb_bot_falange_angle, thumb_top_falange_angle, f1_bot_falange_angle, f1_top_falange_angle, f2_bot_falange_angle, f2_top_falange_angle ) rotate // translate <0, 0.028, 0> // } } } } #end #macro clank_arm(forearm_angle, hand_angle, thumb_bot_falange_angle, thumb_top_falange_angle, f1_bot_falange_angle, f1_top_falange_angle, f2_bot_falange_angle, f2_top_falange_angle) object{ union { // create arm object { union{ // ombrera cylinder { <0, 0, -0.005>, <0, 0, 0.005>, 0.015 // center of one end, center of other end, radius texture{ tx_clank_light_gray} } cylinder { <0, 0, 0.005>, <0, 0, 0.02>, 0.004 // center of one end, center of other end, radius texture{ tx_clank_dark_gray} } cylinder { <0, 0, 0>, <0, 0.03, 0>, 0.004 // center of one end, center of other end, radius translate <0, 0.015, 0> // texture{ tx_clank_dark_gray} } } } // append fingers object{ // hand object { clank_forearm( hand_angle, thumb_bot_falange_angle, thumb_top_falange_angle, f1_bot_falange_angle, f1_top_falange_angle, f2_bot_falange_angle, f2_top_falange_angle ) rotate <0, 0, -forearm_angle> // translate <0, 0.045, 0> // } } } } #end #macro clank_propulsor() object { union { cone { <0, 0, 0>, 0.03 // , center & radius of one end <0, 0.01, -0.09>, 0 // , center & radius of the other end texture{ tx_fire} } cone { <0, 0, 0>, 0.03 // , center & radius of one end <0.01, 0, -0.09>, 0 // , center & radius of the other end texture{ tx_fire} } cone { <0, 0, 0>, 0.03 // , center & radius of one end <0, -0.01, -0.09>, 0 // , center & radius of the other end texture{ tx_fire} } cone { <0, 0, 0>, 0.03 // , center & radius of one end <-0.01, 0, -0.09>, 0 // , center & radius of the other end texture{ tx_fire} } cone { <0, 0, 0>, 0.038 // , center & radius of one end <0, 0, -0.1>, 0 // , center & radius of the other end texture{ tx_fire_red} } } } #end #macro robo_vec(PA) clank_body( PA[0], PA[1], PA[2], PA[3], PA[4], PA[5], PA[6], PA[7], PA[8], PA[9], PA[10], PA[11], PA[12], PA[13], PA[14], PA[15], PA[16], PA[17], PA[18], PA[19], PA[20], PA[21], PA[22], PA[23] ) #end #macro clank_body(prop_rot, prop_trans, mouth_angle, head_angle, arm_angle1_right, arm_angle_2_right, forearm_angle_right, hand_angle_right, thumb_bot_falange_angle_right, thumb_top_falange_angle_right, f1_bot_falange_angle_right, f1_top_falange_angle_right, f2_bot_falange_angle_right, f2_top_falange_angle_right, arm_angle1_left, arm_angle_2_left, forearm_angle_left, hand_angle_left, thumb_bot_falange_angle_left, thumb_top_falange_angle_left, f1_bot_falange_angle_left, f1_top_falange_angle_left, f2_bot_falange_angle_left, f2_top_falange_angle_left) object{ union { // create arm object { union { box { <-0.05, -0.05, 0>, <0.05, 0.05, 0.12> // near lower left corner, far upper right corner texture{ tx_clank_light_gray} } box { <-0.055, -0.04, 0.03>, <0.055, 0.04, 0.1> // near lower left corner, far upper right corner texture{ tx_clank_dark_gray} } } } // append arms object{ // hand union { object { clank_arm( forearm_angle_left,hand_angle_left, thumb_bot_falange_angle_left, thumb_top_falange_angle_left, f1_bot_falange_angle_left, f1_top_falange_angle_left, f2_bot_falange_angle_left, f2_top_falange_angle_left ) rotate <-90, arm_angle1_left, -arm_angle_2_left> // translate <0, -0.07, 0.08> // } object { clank_arm( forearm_angle_right,hand_angle_right, thumb_bot_falange_angle_right, thumb_top_falange_angle_right, f1_bot_falange_angle_right, f1_top_falange_angle_right, f2_bot_falange_angle_right, f2_top_falange_angle_right ) scale <1,-1,1> rotate <90, arm_angle1_right, arm_angle_2_right> // translate <0, 0.07, 0.08> // } } } // append head object { clank_chin(mouth_angle) rotate <0,0,head_angle> translate <0, 0, 0.13> // } // Propulsor cylinder { <0, 0, -0.02>, <0, 0, 0.010>, 0.04 // center of one end, center of other end, radius open // remove end caps texture{ tx_clank_dark_gray} } object { clank_propulsor() rotate <0,0,prop_rot> translate <0, 0, prop_trans> // } } } #end #include "eixos.inc" #macro interpola_vec1(tt, t1, t2, vec1, vec2) #local i=0; #local vec_interpol = array[24]; #while (i < 24) #local vec_interpol[i] = interpola1(tt, t1,t2, vec1[i], vec2[i]); #local i = i+1; #end vec_interpol; #end #macro interpola1(tt, tt0,tt1, vv0,vv1) #local rr = (tt - tt0)/(tt1 - tt0); #local vv = (1-rr)*vv0 + rr*vv1; vv; #end #macro robo_line() #local ii = 0; #local xx = 0; #while (ii < 1) object { robo_mov(ii) translate } #local ii = ii + 0.025; #local xx = xx + 0.2; #end #end #macro quadro_inter1(tf) #local PP = array[24] #local P0 = array[24] #local P1 = array[24] #local P2 = array[24] #local P3 = array[24] #local P0[0] = 180; // prop_rot #local P0[1] = -0.02; // prop_trans, #local P0[2] = 40; // mouth_angle #local P0[3] = 60; // head_angle, #local P0[4] = -80; // arm_angle1_right #local P0[5] = 20; // arm_angle_2_right #local P0[6] = 45; // forearm_angle_right #local P0[7] = 30; // hand_angle_right, #local P0[8] = 45; // thumb_bot_falange_angle_right #local P0[9] = 20; // thumb_top_falange_angle_right, #local P0[10] = 90; // f1_bot_falange_angle_right #local P0[11] = 45; // f1_top_falange_angle_right, #local P0[12] = 50; // f2_bot_falange_angle_right #local P0[13] = 10; // f2_top_falange_angle_right #local P0[14] = 45; // arm_angle1_left #local P0[15] = -20; // arm_angle_2_left #local P0[16] = 45; // forearm_angle_left #local P0[17] = 30; // hand_angle_left, #local P0[18] = 45; // thumb_bot_falange_angle_left #local P0[19] = 20; // thumb_top_falange_angle_left, #local P0[20] = 90; // f1_bot_falange_angle_left #local P0[21] = 45; // f1_top_falange_angle_left, #local P0[22] = 80; // f2_bot_falange_angle_left #local P0[23] = 50; // f2_top_falange_angle_left #local P1[0] = 0; // prop_rot #local P1[1] = 0.02; // prop_trans, #local P1[2] = 0; // mouth_angle #local P1[3] = 0; // head_angle, #local P1[4] = 0; // arm_angle1_right #local P1[5] = 0; // arm_angle_2_right #local P1[6] = 0; // forearm_angle_right #local P1[7] = 0; // hand_angle_right, #local P1[8] = 0; // thumb_bot_falange_angle_right #local P1[9] = 0; // thumb_top_falange_angle_right, #local P1[10] = 0; // f1_bot_falange_angle_right #local P1[11] = 0; // f1_top_falange_angle_right, #local P1[12] = 0; // f2_bot_falange_angle_right #local P1[13] = 0; // f2_top_falange_angle_right #local P1[14] = 0; // arm_angle1_left #local P1[15] = 0; // arm_angle_2_left #local P1[16] = 0; // forearm_angle_left #local P1[17] = 0; // hand_angle_left, #local P1[18] = 0; // thumb_bot_falange_angle_left #local P1[19] = 0; // thumb_top_falange_angle_left, #local P1[20] = 0; // f1_bot_falange_angle_left #local P1[21] = 0; // f1_top_falange_angle_left, #local P1[22] = 0; // f2_bot_falange_angle_left #local P1[23] = 0; // f2_top_falange_angle_left #local P2[0] = -180; // prop_rot #local P2[1] = 0.02; // prop_trans, #local P2[2] = 40; // mouth_angle #local P2[3] = -60; // head_angle, #local P2[4] = 45; // arm_angle1_right #local P2[5] = -20; // arm_angle_2_right #local P2[6] = 45; // forearm_angle_right #local P2[7] = 30; // hand_angle_right, #local P2[8] = 45; // thumb_bot_falange_angle_right #local P2[9] = 20; // thumb_top_falange_angle_right, #local P2[10] = 90; // f1_bot_falange_angle_right #local P2[11] = 45; // f1_top_falange_angle_right, #local P2[12] = 80; // f2_bot_falange_angle_right #local P2[13] = 50; // f2_top_falange_angle_right #local P2[14] = -80; // arm_angle1_left #local P2[15] = 20; // arm_angle_2_left #local P2[16] = 45; // forearm_angle_left #local P2[17] = 30; // hand_angle_left, #local P2[18] = 45; // thumb_bot_falange_angle_left #local P2[19] = 20; // thumb_top_falange_angle_left, #local P2[20] = 90; // f1_bot_falange_angle_left #local P2[21] = 45; // f1_top_falange_angle_left, #local P2[22] = 50; // f2_bot_falange_angle_left #local P2[23] = 10; // f2_top_falange_angle_left #local P3[0] = 0; // prop_rot #local P3[1] = 0;; // prop_trans, #local P3[2] = 0; // mouth_angle #local P3[3] = 0; // head_angle, #local P3[4] = 0; // arm_angle1_right #local P3[5] = 0; // arm_angle_2_right #local P3[6] = 0; // forearm_angle_right #local P3[7] = 0; // hand_angle_right, #local P3[8] = 0; // thumb_bot_falange_angle_right #local P3[9] = 0; // thumb_top_falange_angle_right, #local P3[10] = 0; // f1_bot_falange_angle_right #local P3[11] = 0; // f1_top_falange_angle_right, #local P3[12] = 0; // f2_bot_falange_angle_right #local P3[13] = 0; // f2_top_falange_angle_right #local P3[14] = 0; // arm_angle1_left #local P3[15] = 0; // arm_angle_2_left #local P3[16] = 0; // forearm_angle_left #local P3[17] = 0; // hand_angle_left, #local P3[18] = 0; // thumb_bot_falange_angle_left #local P3[19] = 0; // thumb_top_falange_angle_left, #local P3[20] = 0; // f1_bot_falange_angle_left #local P3[21] = 0; // f1_top_falange_angle_left, #local P3[22] = 0; // f2_bot_falange_angle_left #local P3[23] = 0; // f2_top_falange_angle_left #local T0 = 0.00; #local T1 = 0.25; #local T2 = 0.50; #local T3 = 0.80; #local T4 = 1.00; #if ((T0 <= tf) & (tf <= T1)) #local PP = interpola_vec1(tf, T0,T1, P0,P1) #elseif ((T1 <= tf) & (tf <= T2)) #local PP = interpola_vec1(tf, T1,T2, P1,P2) #elseif ((T2 <= tf) & (tf <= T3)) #local PP = interpola_vec1(tf, T2,T3, P2,P3) #elseif ((T3 <= tf) & (tf <= T4)) #local PP = interpola_vec1(tf, T3,T4, P3,P0) #end object { robo_vec(PP) translate <0, 0, 0.15> } #end #macro quadro_inter3(tf) #local PP = array[24] #local P0 = array[24] #local P0a = array[24] #local P0z = array[24] #local P1 = array[24] #local P1a = array[24] #local P1z = array[24] #local P2 = array[24] #local P2a = array[24] #local P2z = array[24] #local P3 = array[24] #local P3a = array[24] #local P3z = array[24] #local P0[0] = 180; // prop_rot #local P0a[0] = -90; // prop_rot #local P0z[0] = 90; // prop_rot #local P0[1] = -0.02; // prop_trans, #local P0a[1] = -0.03; // prop_trans, #local P0z[1] = -0.01; // prop_trans, #local P0[2] = 40; // mouth_angle #local P0a[2] = 20; // mouth_angle #local P0z[2] = 60; // mouth_angle #local P0[3] = 60; // head_angle, #local P0a[3] = 30; // head_angle, #local P0z[3] = 90; // head_angle, #local P0[4] = -80; // arm_angle1_right #local P0a[4] = -160; // arm_angle1_right #local P0z[4] = -80; // arm_angle1_right #local P0[5] = 20; // arm_angle_2_right #local P0a[5] = 0; // arm_angle_2_right #local P0z[5] = -20; // arm_angle_2_right #local P0[6] = 45; // forearm_angle_right #local P0a[6] = 65; // forearm_angle_right #local P0z[6] = 25; // forearm_angle_right #local P0[7] = 30; // hand_angle_right, #local P0a[7] = 45; // hand_angle_right, #local P0z[7] = 15; // hand_angle_right, #local P0[8] = 45; // thumb_bot_falange_angle_right #local P0a[8] = 60; // thumb_bot_falange_angle_right #local P0z[8] = 22; // thumb_bot_falange_angle_right #local P0[9] = 20; // thumb_top_falange_angle_right, #local P0a[9] = 30; // thumb_top_falange_angle_right, #local P0z[9] = 10; // thumb_top_falange_angle_right, #local P0[10] = 90; // f1_bot_falange_angle_right #local P0a[10] = 130; // f1_bot_falange_angle_right #local P0z[10] = 45; // f1_bot_falange_angle_right #local P0[11] = 45; // f1_top_falange_angle_right, #local P0a[11] = 60; // f1_top_falange_angle_right, #local P0z[11] = 30; // f1_top_falange_angle_right, #local P0[12] = 50; // f2_bot_falange_angle_right #local P0a[12] = 75; // f2_bot_falange_angle_right #local P0z[12] = 25; // f2_bot_falange_angle_right #local P0[13] = 10; // f2_top_falange_angle_right #local P0a[13] = 15; // f2_top_falange_angle_right #local P0z[13] = 5; // f2_top_falange_angle_right #local P0[14] = 45; // arm_angle1_left #local P0a[14] = 65; // arm_angle1_left #local P0z[14] = 25; // arm_angle1_left #local P0[15] = -20; // arm_angle_2_left #local P0a[15] = -30; // arm_angle_2_left #local P0z[15] = -10; // arm_angle_2_left #local P0[16] = 45; // forearm_angle_left #local P0a[16] = 65; // forearm_angle_left #local P0z[16] = 25; // forearm_angle_left #local P0[17] = 30; // hand_angle_left, #local P0a[17] = 45; // hand_angle_left, #local P0z[17] = 15; // hand_angle_left, #local P0[18] = 45; // thumb_bot_falange_angle_left #local P0a[18] = 67; // thumb_bot_falange_angle_left #local P0z[18] = 20; // thumb_bot_falange_angle_left #local P0[19] = 20; // thumb_top_falange_angle_left, #local P0a[19] = 30; // thumb_top_falange_angle_left, #local P0z[19] = 10; // thumb_top_falange_angle_left, #local P0[20] = 90; // f1_bot_falange_angle_left #local P0a[20] = 120; // f1_bot_falange_angle_left #local P0z[20] = 450; // f1_bot_falange_angle_left #local P0[21] = 45; // f1_top_falange_angle_left, #local P0a[21] = 65; // f1_top_falange_angle_left, #local P0z[21] = 15; // f1_top_falange_angle_left, #local P0[22] = 80; // f2_bot_falange_angle_left #local P0a[22] = 120; // f2_bot_falange_angle_left #local P0z[22] = 40; // f2_bot_falange_angle_left #local P0[23] = 50; // f2_top_falange_angle_left #local P0a[23] = 75; // f2_top_falange_angle_left #local P0z[23] = 25; // f2_top_falange_angle_left #local P1[0] = 0; // prop_rot#local P0[23] = 50; // f2_top_falange_angle_left #local P1a[0] = -90; // prop_rot#local P0[23] = 50; // f2_top_falange_angle_left #local P1z[0] = 90; // prop_rot#local P0[23] = 50; // f2_top_falange_angle_left #local P1[1] = 0.02; // prop_trans, #local P1a[1] = 0.02; // prop_trans, #local P1z[1] = 0.02; // prop_trans, #local P1[2] = 0; // mouth_angle #local P1a[2] = -20; // mouth_angle #local P1z[2] = 20; // mouth_angle #local P1[3] = 0; // head_angle, #local P1a[3] = -30; // head_angle, #local P1z[3] = 30; // head_angle, #local P1[4] = 0; // arm_angle1_right #local P1a[4] = -20; // arm_angle1_right #local P1z[4] = 20; // arm_angle1_right #local P1[5] = 0; // arm_angle_2_right #local P1a[5] = 10; // arm_angle_2_right #local P1z[5] = -10; // arm_angle_2_right #local P1[6] = 0; // forearm_angle_right #local P1a[6] = -20; // forearm_angle_right #local P1z[6] = 20; // forearm_angle_right #local P1[7] = 0; // hand_angle_right, #local P1a[7] = -15; // hand_angle_right, #local P1z[7] = 15; // hand_angle_right, #local P1[8] = 0; // thumb_bot_falange_angle_right #local P1a[8] = -20; // thumb_bot_falange_angle_right #local P1z[8] = 20; // thumb_bot_falange_angle_right #local P1[9] = 0; // thumb_top_falange_angle_right, #local P1a[9] = -10; // thumb_top_falange_angle_right, #local P1z[9] = 10; // thumb_top_falange_angle_right, #local P1[10] = 0; // f1_bot_falange_angle_right #local P1a[10] = -45; // f1_bot_falange_angle_right #local P1z[10] = 45; // f1_bot_falange_angle_right #local P1[11] = 0; // f1_top_falange_angle_right, #local P1a[11] = -20; // f1_top_falange_angle_right, #local P1z[11] = 20; // f1_top_falange_angle_right, #local P1[12] = 0; // f2_bot_falange_angle_right #local P1a[12] = -40; // f2_bot_falange_angle_right #local P1z[12] = 40; // f2_bot_falange_angle_right #local P1[13] = 0; // f2_top_falange_angle_right #local P1a[13] = -35; // f2_top_falange_angle_right #local P1z[13] = 25; // f2_top_falange_angle_right #local P1[14] = 0; // arm_angle1_left #local P1a[14] = -40; // arm_angle1_left #local P1z[14] = 40; // arm_angle1_left #local P1[15] = 0; // arm_angle_2_left #local P1a[15] = -10; // arm_angle_2_left #local P1z[15] = 10; // arm_angle_2_left #local P1[16] = 0; // forearm_angle_left #local P1a[16] = -20; // forearm_angle_left #local P1z[16] = 20; // forearm_angle_left #local P1[17] = 0; // hand_angle_left, #local P1a[17] = -15; // hand_angle_left, #local P1z[17] = 15; // hand_angle_left, #local P1[18] = 0; // thumb_bot_falange_angle_left #local P1a[18] = -20; // thumb_bot_falange_angle_left #local P1z[18] = 20; // thumb_bot_falange_angle_left #local P1[19] = 0; // thumb_top_falange_angle_left, #local P1a[19] = -10; // thumb_top_falange_angle_left, #local P1z[19] = 10; // thumb_top_falange_angle_left, #local P1[20] = 0; // f1_bot_falange_angle_left #local P1a[20] = -40; // f1_bot_falange_angle_left #local P1z[20] = 40; // f1_bot_falange_angle_left #local P1[21] = 0; // f1_top_falange_angle_left, #local P1a[21] = -20; // f1_top_falange_angle_left, #local P1z[21] = 20; // f1_top_falange_angle_left, #local P1[22] = 0; // f2_bot_falange_angle_left #local P1a[22] = -20; // f2_bot_falange_angle_left #local P1z[22] = 20; // f2_bot_falange_angle_left #local P1[23] = 0; // f2_top_falange_angle_left #local P1a[23] = -5; // f2_top_falange_angle_left #local P1z[23] = 6; // f2_top_falange_angle_left #local P2[0] = -180; // prop_rot#local P1[23] = 0; // f2_top_falange_angle_left #local P2a[0] = -270; // prop_rot#local P1[23] = 0; // f2_top_falange_angle_left #local P2z[0] = -90; // prop_rot#local P1[23] = 0; // f2_top_falange_angle_left #local P2[1] = 0.02; // prop_trans, #local P2a[1] = 0.03; // prop_trans, #local P2z[1] = 0.01; // prop_trans, #local P2[2] = 40; // mouth_angle #local P2a[2] = 60; // mouth_angle #local P2z[2] = 20; // mouth_angle #local P2[3] = -60; // head_angle, #local P2a[3] = -90; // head_angle, #local P2z[3] = -30; // head_angle, #local P2[4] = 45; // arm_angle1_right #local P2a[4] = 65; // arm_angle1_right #local P2z[4] = 25; // arm_angle1_right #local P2[5] = -20; // arm_angle_2_right #local P2a[5] = -30; // arm_angle_2_right #local P2z[5] = -10; // arm_angle_2_right #local P2[6] = 45; // forearm_angle_right #local P2a[6] = 65; // forearm_angle_right #local P2z[6] = 25; // forearm_angle_right #local P2[7] = 30; // hand_angle_right, #local P2a[7] = 50; // hand_angle_right, #local P2z[7] = 10; // hand_angle_right, #local P2[8] = 45; // thumb_bot_falange_angle_right #local P2a[8] = 65; // thumb_bot_falange_angle_right #local P2z[8] = 25; // thumb_bot_falange_angle_right #local P2[9] = 20; // thumb_top_falange_angle_right, #local P2a[9] = 30; // thumb_top_falange_angle_right, #local P2z[9] = 10; // thumb_top_falange_angle_right, #local P2[10] = 90; // f1_bot_falange_angle_right #local P2a[10] = 150; // f1_bot_falange_angle_right #local P2z[10] = 45; // f1_bot_falange_angle_right #local P2[11] = 45; // f1_top_falange_angle_right, #local P2a[11] = 55; // f1_top_falange_angle_right, #local P2z[11] = 25; // f1_top_falange_angle_right, #local P2[12] = 80; // f2_bot_falange_angle_right #local P2a[12] = 120; // f2_bot_falange_angle_right #local P2z[12] = 40; // f2_bot_falange_angle_right #local P2[13] = 50; // f2_top_falange_angle_right #local P2a[13] = 60; // f2_top_falange_angle_right #local P2z[13] = 20; // f2_top_falange_angle_right #local P2[14] = -80; // arm_angle1_left #local P2a[14] = -100; // arm_angle1_left #local P2z[14] = -40; // arm_angle1_left #local P2[15] = 20; // arm_angle_2_left #local P2a[15] = 30; // arm_angle_2_left #local P2z[15] = 10; // arm_angle_2_left #local P2[16] = 45; // forearm_angle_left #local P2a[16] = 65; // forearm_angle_left #local P2z[16] = 25; // forearm_angle_left #local P2[17] = 30; // hand_angle_left, #local P2a[17] = 60; // hand_angle_left, #local P2z[17] = 15; // hand_angle_left, #local P2[18] = 45; // thumb_bot_falange_angle_left #local P2a[18] = 55; // thumb_bot_falange_angle_left #local P2z[18] = 25; // thumb_bot_falange_angle_left #local P2[19] = 20; // thumb_top_falange_angle_left, #local P2a[19] = 30; // thumb_top_falange_angle_left, #local P2z[19] = 10; // thumb_top_falange_angle_left, #local P2[20] = 90; // f1_bot_falange_angle_left #local P2a[20] = 120; // f1_bot_falange_angle_left #local P2z[20] = 60; // f1_bot_falange_angle_left #local P2[21] = 45; // f1_top_falange_angle_left, #local P2a[21] = 55; // f1_top_falange_angle_left, #local P2z[21] = 15; // f1_top_falange_angle_left, #local P2[22] = 50; // f2_bot_falange_angle_left #local P2a[22] = 60; // f2_bot_falange_angle_left #local P2z[22] = 40; // f2_bot_falange_angle_left #local P2[23] = 10; // f2_top_falange_angle_left #local P2a[23] = 20; // f2_top_falange_angle_left #local P2z[23] = 5; // f2_top_falange_angle_left #local P3[0] = 0; // prop_rot #local P3a[0] = -90; // prop_rot #local P3z[0] = 90; // prop_rot #local P3[1] = 0; // prop_trans, #local P3a[1] = 0.01; // prop_trans, #local P3z[1] = -0.01; // prop_trans, #local P3[2] = 0; // mouth_angle #local P3a[2] = -20; // mouth_angle #local P3z[2] = 20; // mouth_angle #local P3[3] = 0; // head_angle, #local P3a[3] = -30; // head_angle, #local P3z[3] = 30; // head_angle, #local P3[4] = 0; // arm_angle1_right #local P3a[4] = 40; // arm_angle1_right #local P3z[4] = -40; // arm_angle1_right #local P3[5] = 0; // arm_angle_2_right #local P3a[5] = 10; // arm_angle_2_right #local P3z[5] = -10; // arm_angle_2_right #local P3[6] = 0; // forearm_angle_right #local P3a[6] = -20; // forearm_angle_right #local P3z[6] = 20; // forearm_angle_right #local P3[7] = 0; // hand_angle_right, #local P3a[7] = -10; // hand_angle_right, #local P3z[7] = 10; // hand_angle_right, #local P3[8] = 0; // thumb_bot_falange_angle_right #local P3a[8] = -20; // thumb_bot_falange_angle_right #local P3z[8] = 20; // thumb_bot_falange_angle_right #local P3[9] = 0; // thumb_top_falange_angle_right, #local P3a[9] = -10; // thumb_top_falange_angle_right, #local P3z[9] = 10; // thumb_top_falange_angle_right, #local P3[10] = 0; // f1_bot_falange_angle_right #local P3a[10] = -45; // f1_bot_falange_angle_right #local P3z[10] = 45; // f1_bot_falange_angle_right #local P3[11] = 0; // f1_top_falange_angle_right, #local P3a[11] = -20; // f1_top_falange_angle_right, #local P3z[11] = 20; // f1_top_falange_angle_right, #local P3[12] = 0; // f2_bot_falange_angle_right #local P3a[12] = -20; // f2_bot_falange_angle_right #local P3z[12] = 20; // f2_bot_falange_angle_right #local P3[13] = 0; // f2_top_falange_angle_right #local P3a[13] = -5; // f2_top_falange_angle_right #local P3z[13] = 5; // f2_top_falange_angle_right #local P3[14] = 0; // arm_angle1_left #local P3a[14] = -20; // arm_angle1_left #local P3z[14] = 20; // arm_angle1_left #local P3[15] = 0; // arm_angle_2_left #local P3a[15] = 10; // arm_angle_2_left #local P3z[15] = -10; // arm_angle_2_left #local P3[16] = 0; // forearm_angle_left #local P3a[16] = -20; // forearm_angle_left #local P3z[16] = 20; // forearm_angle_left #local P3[17] = 0; // hand_angle_left, #local P3a[17] = -15; // hand_angle_left, #local P3z[17] = 15; // hand_angle_left, #local P3[18] = 0; // thumb_bot_falange_angle_left #local P3a[18] = -20; // thumb_bot_falange_angle_left #local P3z[18] = 20; // thumb_bot_falange_angle_left #local P3[19] = 0; // thumb_top_falange_angle_left, #local P3a[19] = -10; // thumb_top_falange_angle_left, #local P3z[19] = 10; // thumb_top_falange_angle_left, #local P3[20] = 0; // f1_bot_falange_angle_left #local P3a[20] = -45; // f1_bot_falange_angle_left #local P3z[20] = 45; // f1_bot_falange_angle_left #local P3[21] = 0; // f1_top_falange_angle_left, #local P3a[21] = -20; // f1_top_falange_angle_left, #local P3z[21] = 20; // f1_top_falange_angle_left, #local P3[22] = 0; // f2_bot_falange_angle_left #local P3a[22] = -40; // f2_bot_falange_angle_left #local P3z[22] = 40; // f2_bot_falange_angle_left #local P3[23] = 0; // f2_top_falange_angle_left #local P3a[23] = -20; // f2_top_falange_angle_left #local P3z[23] = 20; // f2_top_falange_angle_left #local T0 = 0.00; #local T0 = 0.00; #local T1 = 0.25; #local T2 = 0.50; #local T3 = 0.80; #local T4 = 1.00; #local P0 = interpola_vec1(T0, T0-(T4-T3)/3, T0+(T1-T0)/3, P0a, P0z) #local P1 = interpola_vec1(T1, T1-(T1-T0)/3, T1+(T2-T1)/3, P1a, P1z) #local P2 = interpola_vec1(T2, T2-(T2-T1)/3, T2+(T3-T2)/3, P2a, P2z) #local P3 = interpola_vec1(T3, T3-(T3-T2)/3, T3+(T4-T3)/3, P3a, P3z) #if ((T0 <= tf) & (tf <= T1)) #local PP = interpola3(tf, T0,T1, P0,P0z,P1a,P1); #elseif ((T1 <= tf) & (tf <= T2)) #local PP = interpola3(tf, T1,T2, P1,P1z,P2a,P2); #elseif ((T2 <= tf) & (tf <= T3)) #local PP = interpola3(tf, T2,T3, P2,P2z,P3a,P3); #elseif ((T3 <= tf) & (tf <= T4)) #local PP = interpola3(tf, T3,T4, P3,P3z,P0a,P0); #end object { robo_vec(PP) translate <0, 0, 0.15> } #end #macro interpola3(tt, tt0,tt3, vv0,vv1,vv2,vv3) #local vv01 = interpola_vec1(tt, tt0,tt3, vv0,vv1) #local vv12 = interpola_vec1(tt, tt0,tt3, vv1,vv2) #local vv23 = interpola_vec1(tt, tt0,tt3, vv2,vv3) #local vv012 = interpola_vec1(tt, tt0,tt3, vv01,vv12) #local vv123 = interpola_vec1(tt, tt0,tt3, vv12,vv23) #local vv0123 = interpola_vec1(tt, tt0,tt3, vv012,vv123) vv0123 #end // Aqui est� a cena, finalmente: union{ object{ground} // object{ eixos(0.1) } // robo_line() object{ quadro_inter1(clock) translate <0.2, 0, 0> } object{ quadro_inter3(clock) translate <-0.2, 0, 0> } } #include "camlight.inc" #declare centro_cena = < 0, 0, 0.2 >; #declare raio_cena = 0.5; #declare dir_camera = < 1.0, 1.0, 0.3 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)