I would like to fit a Cubic Bezier Curve in a rectangle, and wondering how to get the 2nd and 3rd control points's Y value, illustrated below:
(Sorry the rectangle is bit distorted.) Basically, given the position of first point (x1, y1), fourth point (x4, y4), and the height of middle point h, how can I get the y2 and y3 from this curve?
curve generated using: http://demofox.org/bezcubic.html
Thank you for any reply in advance.