Guest User

Untitled

a guest
Jan 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. #define NUMCTLPOINTS 7 /* number of control points */
  2. #define ORDER 3 /* order */
  3. #define LENKNOTVEC (NUMCTLPOINTS + ORDER) /* length knotvector */
  4. #define STRIDE 3 /* values per control point: X, Y, weight */
  5.  
  6. /* Knotvector: 5 knots, so 4 segments (of equal reach). */
  7. GLfloat knots[LENKNOTVEC] = {0.00, 0.00, 0.00, /* knot 1, 3-fold */
  8. 0.25, /* knot 2 */
  9. 0.50, 0.50, /* knot 3, 2-fold */
  10. 0.75, /* knot 4 */
  11. 1.00, 1.00, 1.00}; /* knot 5, 3-fold */
  12.  
  13. /* Control points, per point: X, Y, weight. */
  14. GLfloat ctlPoints[NUMCTLPOINTS*STRIDE] = { 1.0, 0.0, 1.0,
  15. 1.0, 1.0, 0.5,
  16. -1.0, 1.0, 0.5,
  17. -1.0, 0.0, 1.0,
  18. -1.0, -1.0, 0.5,
  19. 1.0, -1.0, 0.5,
  20. 1.0, 0.0, 1.0};
Add Comment
Please, Sign In to add comment