// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2021-12-11 04:21:27 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 ambient 0.2 specular 0.1 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 ambient 0.2 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{ union { // 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 robo_mov(tt) #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 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 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 // object{ // union{ // object{ // robo_vec(P0) // translate < -0.5, 0, 0.2> // } // object{ // robo_vec(P1) // translate < 0, 0, 0.2> // } // object{ // robo_vec(P2) // translate < 0.5, 0, 0.2> // } // object{ // robo_vec(P3) // translate < 1, 0, 0.2> // } // } // } #if (tt<=0.25) #local PP[0] = interpola1(tt, 0, 0.25, P0[0], P1[0]); #local PP[1] = interpola1(tt, 0, 0.25, P0[1], P1[1]); #local PP[2] = interpola1(tt, 0, 0.25, P0[2], P1[2]); #local PP[3] = interpola1(tt, 0, 0.25, P0[3], P1[3]); #local PP[4] = interpola1(tt, 0, 0.25, P0[4], P1[4]); #local PP[5] = interpola1(tt, 0, 0.25, P0[5], P1[5]); #local PP[6] = interpola1(tt, 0, 0.25, P0[6], P1[6]); #local PP[7] = interpola1(tt, 0, 0.25, P0[7], P1[7]); #local PP[8] = interpola1(tt, 0, 0.25, P0[8], P1[8]); #local PP[9] = interpola1(tt, 0, 0.25, P0[9], P1[9]); #local PP[10] = interpola1(tt, 0, 0.25, P0[10], P1[10]); #local PP[11] = interpola1(tt, 0, 0.25, P0[11], P1[11]); #local PP[12] = interpola1(tt, 0, 0.25, P0[12], P1[12]); #local PP[13] = interpola1(tt, 0, 0.25, P0[13], P1[13]); #local PP[14] = interpola1(tt, 0, 0.25, P0[14], P1[14]); #local PP[15] = interpola1(tt, 0, 0.25, P0[15], P1[15]); #local PP[16] = interpola1(tt, 0, 0.25, P0[16], P1[16]); #local PP[17] = interpola1(tt, 0, 0.25, P0[17], P1[17]); #local PP[18] = interpola1(tt, 0, 0.25, P0[18], P1[18]); #local PP[19] = interpola1(tt, 0, 0.25, P0[19], P1[19]); #local PP[20] = interpola1(tt, 0, 0.25, P0[20], P1[20]); #local PP[21] = interpola1(tt, 0, 0.25, P0[21], P1[21]); #local PP[22] = interpola1(tt, 0, 0.25, P0[22], P1[22]); #local PP[23] = interpola1(tt, 0, 0.25, P0[23], P1[23]); #end #if (tt>0.25 & tt<=0.5) #local PP[0] = interpola1(tt, 0.25, 0.5, P1[0], P2[0]); #local PP[1] = interpola1(tt, 0.25, 0.5, P1[1], P2[1]); #local PP[2] = interpola1(tt, 0.25, 0.5, P1[2], P2[2]); #local PP[3] = interpola1(tt, 0.25, 0.5, P1[3], P2[3]); #local PP[4] = interpola1(tt, 0.25, 0.5, P1[4], P2[4]); #local PP[5] = interpola1(tt, 0.25, 0.5, P1[5], P2[5]); #local PP[6] = interpola1(tt, 0.25, 0.5, P1[6], P2[6]); #local PP[7] = interpola1(tt, 0.25, 0.5, P1[7], P2[7]); #local PP[8] = interpola1(tt, 0.25, 0.5, P1[8], P2[8]); #local PP[9] = interpola1(tt, 0.25, 0.5, P1[9], P2[9]); #local PP[10] = interpola1(tt, 0.25, 0.5, P1[10], P2[10]); #local PP[11] = interpola1(tt, 0.25, 0.5, P1[11], P2[11]); #local PP[12] = interpola1(tt, 0.25, 0.5, P1[12], P2[12]); #local PP[13] = interpola1(tt, 0.25, 0.5, P1[13], P2[13]); #local PP[14] = interpola1(tt, 0.25, 0.5, P1[14], P2[14]); #local PP[15] = interpola1(tt, 0.25, 0.5, P1[15], P2[15]); #local PP[16] = interpola1(tt, 0.25, 0.5, P1[16], P2[16]); #local PP[17] = interpola1(tt, 0.25, 0.5, P1[17], P2[17]); #local PP[18] = interpola1(tt, 0.25, 0.5, P1[18], P2[18]); #local PP[19] = interpola1(tt, 0.25, 0.5, P1[19], P2[19]); #local PP[20] = interpola1(tt, 0.25, 0.5, P1[20], P2[20]); #local PP[21] = interpola1(tt, 0.25, 0.5, P1[21], P2[21]); #local PP[22] = interpola1(tt, 0.25, 0.5, P1[22], P2[22]); #local PP[23] = interpola1(tt, 0.25, 0.5, P1[23], P2[23]); #end #if (tt>0.5 & tt<=0.75) #local PP[0] = interpola1(tt, 0.5, 0.75, P2[0], P3[0]); #local PP[1] = interpola1(tt, 0.5, 0.75, P2[1], P3[1]); #local PP[2] = interpola1(tt, 0.5, 0.75, P2[2], P3[2]); #local PP[3] = interpola1(tt, 0.5, 0.75, P2[3], P3[3]); #local PP[4] = interpola1(tt, 0.5, 0.75, P2[4], P3[4]); #local PP[5] = interpola1(tt, 0.5, 0.75, P2[5], P3[5]); #local PP[6] = interpola1(tt, 0.5, 0.75, P2[6], P3[6]); #local PP[7] = interpola1(tt, 0.5, 0.75, P2[7], P3[7]); #local PP[8] = interpola1(tt, 0.5, 0.75, P2[8], P3[8]); #local PP[9] = interpola1(tt, 0.5, 0.75, P2[9], P3[9]); #local PP[10] = interpola1(tt, 0.5, 0.75, P2[10], P3[10]); #local PP[11] = interpola1(tt, 0.5, 0.75, P2[11], P3[11]); #local PP[12] = interpola1(tt, 0.5, 0.75, P2[12], P3[12]); #local PP[13] = interpola1(tt, 0.5, 0.75, P2[13], P3[13]); #local PP[14] = interpola1(tt, 0.5, 0.75, P2[14], P3[14]); #local PP[15] = interpola1(tt, 0.5, 0.75, P2[15], P3[15]); #local PP[16] = interpola1(tt, 0.5, 0.75, P2[16], P3[16]); #local PP[17] = interpola1(tt, 0.5, 0.75, P2[17], P3[17]); #local PP[18] = interpola1(tt, 0.5, 0.75, P2[18], P3[18]); #local PP[19] = interpola1(tt, 0.5, 0.75, P2[19], P3[19]); #local PP[20] = interpola1(tt, 0.5, 0.75, P2[20], P3[20]); #local PP[21] = interpola1(tt, 0.5, 0.75, P2[21], P3[21]); #local PP[22] = interpola1(tt, 0.5, 0.75, P2[22], P3[22]); #local PP[23] = interpola1(tt, 0.5, 0.75, P2[23], P3[23]); #end #if (tt>0.75 & tt<=1) #local PP[0] = interpola1(tt, 0.75, 1, P3[0], P0[0]); #local PP[1] = interpola1(tt, 0.75, 1, P3[1], P0[1]); #local PP[2] = interpola1(tt, 0.75, 1, P3[2], P0[2]); #local PP[3] = interpola1(tt, 0.75, 1, P3[3], P0[3]); #local PP[4] = interpola1(tt, 0.75, 1, P3[4], P0[4]); #local PP[5] = interpola1(tt, 0.75, 1, P3[5], P0[5]); #local PP[6] = interpola1(tt, 0.75, 1, P3[6], P0[6]); #local PP[7] = interpola1(tt, 0.75, 1, P3[7], P0[7]); #local PP[8] = interpola1(tt, 0.75, 1, P3[8], P0[8]); #local PP[9] = interpola1(tt, 0.75, 1, P3[9], P0[9]); #local PP[10] = interpola1(tt, 0.75, 1, P3[10], P0[10]); #local PP[11] = interpola1(tt, 0.75, 1, P3[11], P0[11]); #local PP[12] = interpola1(tt, 0.75, 1, P3[12], P0[12]); #local PP[13] = interpola1(tt, 0.75, 1, P3[13], P0[13]); #local PP[14] = interpola1(tt, 0.75, 1, P3[14], P0[14]); #local PP[15] = interpola1(tt, 0.75, 1, P3[15], P0[15]); #local PP[16] = interpola1(tt, 0.75, 1, P3[16], P0[16]); #local PP[17] = interpola1(tt, 0.75, 1, P3[17], P0[17]); #local PP[18] = interpola1(tt, 0.75, 1, P3[18], P0[18]); #local PP[19] = interpola1(tt, 0.75, 1, P3[19], P0[19]); #local PP[20] = interpola1(tt, 0.75, 1, P3[20], P0[20]); #local PP[21] = interpola1(tt, 0.75, 1, P3[21], P0[21]); #local PP[22] = interpola1(tt, 0.75, 1, P3[22], P0[22]); #local PP[23] = interpola1(tt, 0.75, 1, P3[23], P0[23]); #end object { robo_vec(PP) } #end // #macro interpola_vec(tt, vec1, vec2): // #local i=0; // #local vec_interpol = array[24] // #while (i < 24) // #local vec_interpol[i] = interpola1(tt, 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 #local p0 = <0.0, 0.0, 0.2>; #macro robo_line() #local ii = 0; #local xx = 0; #local dii = 1.0/10; #while (ii < 1) #declare p1 = ; object { robo_mov(ii) translate p1 } #local ii = ii + dii; #local xx = xx + 0.22; #end #end // Aqui est� a cena, finalmente: union{ object{ground} // object{ eixos(0.1) } robo_line() } #include "camlight.inc" #declare centro_cena = (p0 + p1)/2 + < 0.10, 0.00, 0.00 >; #declare raio_cena = 0.45*vlength(p1-p0); #declare dir_camera = < 1.00, 1.00, 0.20 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)