Nonparametric Hermite cubic to Bezier Curve

bezier-curvecurveshermite-polynomialsmatricesspline

I have a Hermite cubic in the form of the standard cubic equation of $y=ax^3+bx^2+cx+d$, and this works well for my interpolation needs, but now I want to create Bezier curves from the Hermite cubics. I struggle to find a way to transform a Hermite cubic into a Bezier curve.

I've followed Joshua Barczak's blog about transforming a Hermite curve into a Bezier curve, and this seems to work, but I only end up with Bezier curves that are lines after doing this for x and y. For example, a
Hermite cubic given (0, 0) and (1, 1) with $f'(0)=0$ and $f'(1)=0$ aka $y=-2x^3+3x^2$ transforms into this green curve. Another example would be a Hermite cubic given (-1, 0) and (1, 2) with $f'(-1)=0$ and $f'(1)=0$ or the equation $-0.5x^3+1.5x+1$, which is also a line once transformed.

I believe that I am misunderstanding either the Hermite control points, since I do not use a parametrized function, or that I am incorrectly applying Barczak's method, but it seems like it is simply multiplying the inverse Bezier matrix by the Hermite basis matrix by the Hermite control matrix to find the Bezier control matrix.

You can see the actual desmos graph here.

Best Answer

Suppose the start and end-points of the cubic are $P_0 = (x_0, y_0)$ and $P_1 = (x_1,y_1)$, and the starting and ending slopes (first derivatives) are $d_0$ and $d_1$.

Then, to express this as a 2D parametric cubic Bezier curve, the control points you use are: $$ (x_0, y_0) \\ \big(\; x_0 + \tfrac13(x_1 - x_0) \; , \; y_0 + \tfrac13d_0(x_1 - x_0) \;\big) \\ \big(\; x_1 - \tfrac13(x_1 - x_0) \; , \; y_1 - \tfrac13d_1(x_1 - x_0) \;\big) \\ (x_1, y_1) $$

Related Question