[Math] Convert quadratic bezier curve to parabola

bezier-curvequadratics

A quadratic Bézier curve is a segment of a parabola. If the $3$ control points and the quadratic Bézier curve are known, how do you calculate the equation of the parabola (which is an $y=f(x)$ function) that this Bézier curve is a part of? (algebraically)

So in the image, the red curve is known, how do you find the equation $y=ax^{2}+bx+c$ for the black curve?

enter image description here

This is accidentally a special case because the control polygon is a horizontal & a vertical segment, but a general solution can be worked out I hope.

It's actually the opposite direction of this question.

Best Answer

In Theorem $3.4$ of this paper, a more general algorithm for finding the the conic associated with a rational quadatic spline is derived. Specialized for non-rational quadratic splines and parabolas, we get the equation for the parabola $$ \begin{bmatrix}x&y&1\end{bmatrix}Q\begin{bmatrix}x\\y\\1\end{bmatrix}=0 $$ where $$ Q=2\left(uw^T+wu^T\right)-vv^T $$ and, using $a=p_0$, $b=p_1$, and $c=p_2$, $$ u=\begin{bmatrix}b_y-c_y\\c_x-b_x\\b_xc_y-b_yc_x\end{bmatrix}\\ v=\begin{bmatrix}c_y-a_y\\a_x-c_x\\c_xa_y-c_ya_x\end{bmatrix}\\ w=\begin{bmatrix}a_y-b_y\\b_x-a_x\\a_xb_y-a_yb_x\end{bmatrix} $$