void BezierCurveCalcCurve(CvPoint pt1, CvPoint pt2, CvPoint pt3) { for (int t = 0; t < 101; t++) { double xt = pow(1-(t/100.0),2.0) * pt1.x + 2*(1-(t/100.0)) * (t/100.0) * pt2.x + (t/100.0)*(t/100.0) * pt3.x; double yt = pow(1-(t/100.0),2.0) * pt1.y + 2*(1-(t/100.0)) * (t/100.0) * pt2.y + (t/100.0)*(t/100.0) * pt3.y; cvSet2D(image,xt, yt, cvScalar(255,0,0,0)); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)