Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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 points for Bezier curve if I have a starting point and an ending point?

share|improve this question

closed as off-topic by Josh Petrie Dec 2 '13 at 0:49

  • This question does not appear to be about game development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

3  
Cross-post from math.SE. @Bezier Guy, this is considered bad etiquette because it increases the chances that someone will spend time coming up with an answer unnecessarily - because they can't see that you already got the same answer elsewhere. –  Peter Taylor May 31 '11 at 21:43
    
Sorry, I shouldn't do this. –  Bezier Guy May 31 '11 at 22:28
1  
and math.se is probably a better place for this anyway =) –  Jari Komppa Sep 19 '11 at 9:54
    
This question appears to be off-topic because it is about general mathematics. –  Josh Petrie Dec 2 '13 at 0:49

Browse other questions tagged or ask your own question.