I have a question regarding calculation of a cubic Bezier curve. I'm programming an app where in there's continuous straight line motion of a vehicle at a constant speed. (Let's call it $u$). When the user taps a button, the vehicle decelerates at a constant rate and finally stops after a time period $t$ and moving a certain distance $d$.
However, due to restrictions of the system I'm coding in, I'm supposed to model this deceleration using a Bezier curve. The $y$ axis of the Bezier curve would be distance moved, while the $x$ axis is time. The system only lets me modify the 2 control points (or guide points) of the curve. The initial point is set to $(0,0)$ and the final point is set to $(1,1)$.
At this point, I already know the value of $t$, the value of $d$, and also the value of $u$. Final velocity $v = 0$. Using this I can even calculate the deceleration rate as $a = (v-u)/t$ since deceleration is linear. However, the system only takes the two middle points of the Bezier curve to model this deceleration.
Could I have some help in using the values I have to get the Bezier points?
Note: The bezier curve is normalized. the initial point is set to (0,0) and the final to (1,1). So it assumes that the deceleration animation starts at x = 0 (time = 0) and ends at x = 1 (time = t), and y = 0 when distance moved = 0, and y = 1 when distance moved = d