I just asked this in the Computing sections but they sent me here:
"So I've been looking around for some sort of method to allow me to find the Y-coordinate on a Cubic Bezier Curve, given an x-coordinate on it.
I've come across lots of places telling me to treat it a cubic function then attempt to find the roots, which I understand HOWEVER the equation for a Cubic Bezier curve is (for x-coords):
$$X(t) = (1-t)^3X_0 + 3(1-t)^2tX_1 + 3(1-t)t^2X_2 + t^3X_3$$
What confuses me is the addition of the $(1-t)$ values. For instance, if I fill in the $X_i$ values with some random numbers:
$$400 = (1-t)^3*100 + 3(1-t)^2t*600 + 3(1-t)t^2 * 800 + t^3 * 800$$
then rearrange to a cubic equation:
$$800t^3 + 3(1-t)800t^2 + 3(1-t)^2600t + (1-t)^3100 - 400 = 0$$
I still have the trouble of the $(1-t)$ blocks. I can't work out how I am supposed to solve $t$ when the $(1-t)$ is unknown in the first place.
Any ideas?