How to convert for example this Bézier curve: cubic-bezier($.65,0,.65,1$) (plot) to an equation like $f(x) = x...$ ?
2 Answers
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.
Here is a link to a desmos I whipped up, which will create a bezier curve based on some points using a function. The problem with a method like this though, is that there are many point combinations that will result in a domain error, so if the points do not show up on a graph or return an error then they cannot be plotted using a function.

And in case the link has expired here is the math to do it (I had to split up the equation otherwise it would exceed the character limit for answers): $$x_{0}=0$$ $$y_{0}=0$$ $$x_{1}=0$$ $$y_{1}=0$$ $$x_{2}=0$$ $$y_{2}=0$$ $$x_{3}=0$$ $$y_{3}=0$$
$$s=(4(-9*x_{1}^{2}+9*x_{2}*x_{1}+9*x_{3}*x_{1}-9*x_{2}^{2}+9*x_{0}*x_{2}-9*x_{0}*x_{3})^{3}+(-54*x_{1}^{3}+243*x*x_{1}^{2}+81*x_{2}*x_{1}^{2}-162*x_{3}*x_{1}^{2}+81*x_{2}^{2}*x_{1}-162*x*x_{0}*x_{1}-486*x*x_{2}*x_{1}+81*x_{0}*x_{2}*x_{1}+162*x*x_{3}*x_{1}+81*x_{0}*x_{3}*x_{1}+81*x_{2}*x_{3}*x_{1}-54*x_{2}^{3}+27*x*x_{0}^{2}+243*x*x_{2}^{2}-162*x_{0}*x_{2}^{2}+27*x*x_{3}^{2}-27*x_{0}*x_{3}^{2}+162*x*x_{0}*x_{2}-27*x_{0}^{2}*x_{3}-54*x*x_{0}*x_{3}-162*x*x_{2}*x_{3}+81*x_{0}*x_{2}*x_{3})^{2})$$
$$c=\sqrt[3]{-54*x_{1}^{3}+243*x*x_{1}^{2}+81*x_{2}*x_{1}^{2}-162*x_{3}*x_{1}^{2}+81*x_{2}^{2}*x_{1}-162*x*x_{0}*x_{1}-486*x*x_{2}*x_{1}+81*x_{0}*x_{2}*x_{1}+162*x*x_{3}*x_{1}+81*x_{0}*x_{3}*x_{1}+81*x_{2}*x_{3}*x_{1}-54*x_{2}^{3}+27*x*x_{0}^{2}+243*x*x_{2}^{2}-162*x_{0}*x_{2}^{2}+27*x*x_{3}^{2}-27*x_{0}*x_{3}^{2}+162*x*x_{0}*x_{2}-27*x_{0}^{2}*x_{3}-54*x*x_{0}*x_{3}-162*x*x_{2}*x_{3}+81*x_{0}*x_{2}*x_{3}+s}$$
$$t=-(x_{0}-2*x_{1}+x_{2})/(-x_{0}+3*x_{1}-3*x_{2}+x_{3})+c/(3*\sqrt[3]{2}*(-x_{0}+3*x_{1}-3*x_{2}+x_{3}))-(\sqrt[3]{2}*(-9*x_{1}^{2}+9*x_{2}*x_{1}+9*x_{3}*x_{1}-9*x_{2}^{2}+9*x_{0}*x_{2}-9*x_{0}*x_{3}))/(3*(-x_{0}+3*x_{1}-3*x_{2}+x_{3})*c)$$
$$y=(1-t)*((1-t)*((1-t)*y_{0}+t*y_{1})+t*((1-t)*y_{1}+t*y_{2}))+t*((1-t)*((1-t)*y_{1}+t*y_{2})+t*((1-t)*y_{2}+t*y_{3}))$$
- 143
-
but they can be plotted with multiple functions – Rainb Aug 18 '22 at 07:24
-
Is there a way to go in reverse? I'm trying to find good bezier points that approximate the equation 3x^{2}-2x^{3} – tettoffensive Mar 23 '23 at 05:05
-
I would take a look at StackOverflow for a couple solid explanations on how to do so: https://stackoverflow.com/questions/33859199/convert-polynomial-curve-to-bezier-curve-control-points. – Leon Mar 24 '23 at 06:40