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)^3 * X0 + 3*(1-t)^2 * t * X1 + 3*(1-t) * t^2 * X2 + t^3 * X3
What confuses me is the addition of the (1-t) values. For instance, if I fill in the X values with some random numbers...
400 = (1-t)^3 * 100 + 3*(1-t)^2 * t * 600 + 3*(1-t) * t^2 * 800 + t^3 * 800
then rearrange to the Cubic equation style:
800t^3 + 3*(1-t)800t^2 + 3(1-t)^2*600t + (1-t)^3*100 -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?"