Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- point3 bezierCurve::drawPointBezier(point3 TabPc[], float t)
- {
- point3 res = point3(0,0,0);
- for (int i = 0; i <= n-1; ++i)
- {
- /*cout << "TabPC : " << TabPc[i].x <<endl;
- cout << "TabPC : " << TabPc[i].y << endl; */
- res.x = res.x + (TabPc[i].x*Bernstein(i,n-1,t));
- //cout << "res.x : " << res.x << endl;
- res.y = res.y + (TabPc[i].y*Bernstein(i,n-1,t));
- //cout << "res.y : " << res.y << endl;
- res.z = res.z + (TabPc[i].z*Bernstein(i,n-1,t));
- //res = res + TabPc[i]*Bernstein(i, n-1,t);
- }
- return res;
- }
Add Comment
Please, Sign In to add comment