Guest User

Untitled

a guest
Dec 13th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. point3 bezierCurve::drawPointBezier(point3 TabPc[], float t)
  2. {
  3. point3 res = point3(0,0,0);
  4. for (int i = 0; i <= n-1; ++i)
  5. {
  6.  
  7. /*cout << "TabPC : " << TabPc[i].x <<endl;
  8. cout << "TabPC : " << TabPc[i].y << endl; */
  9. res.x = res.x + (TabPc[i].x*Bernstein(i,n-1,t));
  10. //cout << "res.x : " << res.x << endl;
  11. res.y = res.y + (TabPc[i].y*Bernstein(i,n-1,t));
  12. //cout << "res.y : " << res.y << endl;
  13. res.z = res.z + (TabPc[i].z*Bernstein(i,n-1,t));
  14. //res = res + TabPc[i]*Bernstein(i, n-1,t);
  15. }
  16.  
  17.  
  18. return res;
  19. }
Add Comment
Please, Sign In to add comment