How can I extend bezier curve?
===

I am using this piece of code to cauculate a cubic bezier curve for s in [0, 1]. I want to extend the curve base on its geometric continuity. I tried just set s other than [0, 1] but the result is not correct. Is there actually a possible algorithm for calculating bezier point ?

pb, pbh, peh, pe are vectors of cubic bezier's control points.

	*pq = pb*powf(1-s, 3) + pbh*(3*s*(powf(1-s, 2))) + peh*(3*powf(s, 2)*(1-s)) + pe*powf(s,3);

Thanks in advance