I have linear equation of Bezier curve with one control point:
f[x_] := (1 – t)^2 x0 + 2 (1 – t) t x1 + t^2 x2;
f[y_] := (1 – t)^2 y0 + 2 (1 – t) t y1 + t^2 y2;
I have a specific Bezier curve and $y$ value and I want get the corresponding $x$ point on my curve.
I have the following second-order equations:
x[t_] := a t^2 + b t + c;
y[t_] := d t^2 + e t + f;
I solve these equations and get two values for $t$ and then replace $t1$ and $t2$ in $y$ linear equation of the curve and if answer of each one equal to my input $y$. Then I replace that $t$ in $y$ linear equation of the curve and get my $x$. My problem is that sometime answer of none of $y$ linear equation of the curve is not equal to input $y$.
for example I have these values
x0:=1
y0:=30
x1:=20
y1:=1
x2:=50
y2=30
and I want $x$ for
y:=10
I try my method for some curves and I find out when $delta$ is negetive in above second-order equation it dont work right.
I don't know what is my problem.
2P0
(as your code states)? And what can the code snippet[x, y]
possibly mean? And instead ofx(t)
to you actually meanx[t_]
? And do you want to raise the valueat
to the second power (as your code states)? I think you have many many syntactic errors here. $\endgroup$