[Math] How to find the vertex of a (Bézier) quadratic curve

geometryquadratics

Before I elaborate, I do not mean a quadratic function! I mean a quadratic curve as seen here.
With these curves, you are given 3 points: the starting point, the control point, and the ending point. I need to know how to find the vertex of the curve. Also, I am talking about Bézier curves, but just quadratic Bézier curves-the ones with only 3 points.

Best Answer

Given the parametric parabola:

$$ P(t) = P_0 (1 - t)^2 + 2 P_1 t (1 - t) + P_2 t^2 $$

The vertex of a parabola is where the magnitude of the derivative is at a minimum. The component-wise derivatives are:

$$ x'(t) = 2 (x_0 - 2 x_1 + x_2) t + 2 (x_1 - x_0) \\ y'(t) = 2 (y_0 - 2 y_1 + y_2) t + 2 (y_1 - y_0) $$

We want to minimize the magnitude of the derivative $x'(t)^2 + y'(t)^2 = a t^2 + b t + c$, but it's known that the minimum of the parabola $a t^2 + b t + c$ is at the vertex:

$$ t = -\frac{b}{2a} $$

Expanding and then factoring using dot products gives:

$$ t = \frac{(P_0 - P_1) \cdot (P_0 + P_2 - 2 P_1)}{(P_0 + P_2) \cdot (P_0 + P_2) - 4 P_1 \cdot (P_0 + P_2 - P_1)} $$

Note that the common factor of $P_3 = P_0 + P_2$ can be pulled out for more efficient computation:

$$ t = \frac{(P_0 - P_1) \cdot (P_3 - 2 P_1)}{P_3 \cdot P_3 - 4 P_1 \cdot (P_3 - P_1)} $$