Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define NUMCTLPOINTS 7 /* number of control points */
- #define ORDER 3 /* order */
- #define LENKNOTVEC (NUMCTLPOINTS + ORDER) /* length knotvector */
- #define STRIDE 3 /* values per control point: X, Y, weight */
- /* Knotvector: 5 knots, so 4 segments (of equal reach). */
- GLfloat knots[LENKNOTVEC] = {0.00, 0.00, 0.00, /* knot 1, 3-fold */
- 0.25, /* knot 2 */
- 0.50, 0.50, /* knot 3, 2-fold */
- 0.75, /* knot 4 */
- 1.00, 1.00, 1.00}; /* knot 5, 3-fold */
- /* Control points, per point: X, Y, weight. */
- GLfloat ctlPoints[NUMCTLPOINTS*STRIDE] = { 1.0, 0.0, 1.0,
- 1.0, 1.0, 0.5,
- -1.0, 1.0, 0.5,
- -1.0, 0.0, 1.0,
- -1.0, -1.0, 0.5,
- 1.0, -1.0, 0.5,
- 1.0, 0.0, 1.0};
Add Comment
Please, Sign In to add comment