Getting the derivative of the cubic Bezier curve:


Produces the following:


Assuming P'(t)=0, is it possible to solve for t?


1 Answer 1


Let’s assume that your points are 2D, say $P_0 = (x_0,y_0)$, $P_1= (x_1,y_1)$, and so on.

Then the equation $P’(t)=0$ is actually two equations that need to be satisfied: \begin{align} 3(−x_0−2x_1)+6𝑡(x_0+x_1+x_2)+3𝑡^2(x_3−x_0) &=0 \\ 3(−y_0−2y_1)+6𝑡(y_0+y_1+y_2)+3𝑡^2(y_3−y_0) &=0 \\ \end{align} Each of these is a quadratic, which you can solve using the high-school formula, to get values of $t$. Then you can check if there’s a value of $t$ that satisfies both equations.

For a general cubic, it’s highly unlikely that you will find a point where $P’(t)=0$. The equation of $P’$ represents a parabola, and $P’(t)=0$ means that the parabola passes through the origin, which probably won’t happen, in general.

If your points are 3D, then three equations will have to be satisfied simultaneously to get $P’(t)=0$, so this is even less likely to happen.

Maybe you’re thinking that $P’(t)=0$ corresponds to places where the curve tangent is horizontal. That’s not true. The tangent is horizontal where $y’(t)=0$, and you can find such places by solving the second of the two equations shown above: $$ 3(−y_0−2y_1)+6𝑡(y_0+y_1+y_2)+3𝑡^2(y_3−y_0) =0 $$ This equation won’t always have (real) solutions, but it often will.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .