I need to write an openGL program to generate and display a piecewise quadratic Bezier curve that interpolates each set of data points.
0.1 0, 0 0, 0 5, 0.25 5, 0.25 0, 5 0, 5 5, 10 5, 10 0, 9.5 0
The curve should have continuous tangent directions, the tangent direction at each data point being a convex combination of the two adjacent chord directions.
I am not good at math, can anyone give me some suggestions about what formula I can use to calculate control point for Bezier curve if I have a starting point and an ending point.
Thanks in advance