[Math] Convert Bézier curve to equation

bezier-curve

How to convert for example this Bézier curve: cubic-bezier($.65,0,.65,1$) (plot) to an equation like $f(x) = x…$ ?

Best Answer

You can't; not easily, anyway. The way the app works is that the four numbers $(a,b,c,d)$ represent the cubic Bezier curve with control points $\mathbf{P}_0 = (0,0)$, $\mathbf{P}_1 = (a,b)$, $\mathbf{P}_2 = (c,d)$, $\mathbf{P}_3 = (1,1)$.

This curve can be written in parametric form as $$ x(t) = 3 a t + (3c -6 a) t^2 + (1 + 3 a - 3 c) t^3 $$ $$ y(t) = 3 b t + (3d -6 b) t^2 + (1 + 3 b - 3 d) t^3 $$ If you want to write this in the form $y = f(x)$, then the "$f$" would have to include all the algebra for solving a general cubic equation, which is a rather nasty mess.

See also the answers to this question.