   Cubic Curve & Key Frame
  Hi all!Compute a 2D Point in a Cubic Curve on time 't' is quite simple:-------------------------------------------------------------------a = 1.0f - (t * 0.05f);b = 1.0f - a;// Get a point on the curvept.x = pt1.x*a*a*a + ptCtrl2.x*3*a*a*b + ptCtrl1.x*3*a*b*b + pt2.x*b*b*b;pt.y = pt1.y*a*a*a + ptCtrl2.y*3*a*a*b + ptCtrl1.y*3*a*b*b + pt2.y*b*b*b;-------------------------------------------------------------------Now, the problem : I have a Cubic curve Key frame list.  Instead of a 2D coordinate point,  it's 1D.   For each point (pt1, ptCtrl2,  ptCtrl1, pt2),  x  axis is TIME and y axis is value.How can I compute value for time 't'?Thanks,Michel.   
  It's just a cubic equation, so first you have to expand it out into its t3, t2, t, and constant terms.  Then use your favorite method for solving cubic equations to get t.  Keep in mind that there may be multiple solutions.   ;  Well,  I'm not good at math...  I found that on a math book but I'm not completly sure on what happen:I know TIME_FRAME,  and I want the value on Cubic curve that correspond to TIME_FRAME axis.t = (TIME_FRAME - pPrevKey->Frame) / (pCurKey->Frame - pPrevKey->Frame);t -> t is time on range 0.0 to 1.0DeltaX = (pPrevKey->ptCtrl1.x - pPrevKey->Frame);DeltaY = (pPrevKey->ptCtrl1.y - pPrevKey->value);m0 = (DeltaY != 0.0f ) ? DeltaX / DeltaY : 0.0f;DeltaX = (pCurKey->ptCtrl2.x - pCurKey->Frame);DeltaY = (pCurKey->ptCtrl2.y - pCurKey->value);m1 = (DeltaY != 0.0f ) ? DeltaX / DeltaY : 0.0f;a = m0 + m1 + 2 * (pPrevKey->value - pCurKey->value);b = 3 * (pCurKey->value - pPrevKey->value) - m1 - m0;c = m0;d = m1;Value_OF_TIME_FRAME = a*t*t*t + b*t*t + c*t + d;It doesn't work :(