how can correctly interpolate between 2 euler angles given time (or velocity)?
for instance, want implement simple blink, rotating lids first down , again. time blink takes should between 50 , 500ms. @ moment calculate x value(for down) :
eigen::vector3f rotateleftliddown(float step) { return eigen::vector3f(-step*complete_closure,0,0); } //interpolation float duration =gen_random_float(0.05f,0.5f); for(float i=0;i<1;i=i+(duration)) { leftlid.push_back(rotateleftliddown(i)); } for(float i=1;i>0;i=i-(duration)) { leftlid.push_back(rotateleftlidup(i)); }
every calculating step later popped sack , applied nodes @ 100hertz rate.. approach can blink fast or slow, doesnot seem right. dont consider speed of eyelids , "interpolating" here dirty...is better transform euler quaternions or rotation matrices?
a function blink(500ms), considers peak velocity downward 280mm/s within 70ms , open eyelid 100mm/s me.
i assume 3d? in case use quaternions represent orientation in space. interpolation simple interpolation of quaternions.
Comments
Post a Comment