Bezier Curve ------------ We want to draw the curve P(t), 0 <= t <= 1, such that the curve passes through p0 and p3. Curve has tangent 3(p1 - p0) at p0 and 3(p3 - p2) at p3 or P'(0) = 3 (p1 - p0) and P'(1) = 3 (p3 - p2) Suppose the curve is P(t) = The constraints for x x(0) = P1x x(1) = P4x x'(0) = 3(P1x - P0x) x'(1) = 3(P3x - P2x) Note that this has 4 constraints, in looking for a curve x(t) that satisfies these variables, we need 4 free variables. x(t) = at^3 + bt^2 + ct + d x(t) = [t^3 t^2 t^1 1] [a b c d ] and x'(t) = [3t^2 2t 1 0] ... d = p0x c = 3px1 - 3p0x b = 3p2x - 6p1x + 3p0x a = 3p1x - p0x + p3x - 3p2x [ 3p1x p0x p3x 3p2x 3p2x 6p1x 3p0x 3px1 3p0x p0x ] == yuck or [t^3 t^2 t 1] [ -1 3 -3 1 [ p0x 3 -6 3 0 p1x -3 3 0 0 p2x 1 0 0 0 ] p3x ] generally P->t == same as above with p0->, etc. substituted for p0x