Example: NURBS Data Format
The system defines the NURBS (nonuniform rational B-spline) curve by expandable arrays of knots, weights, and control points. The following illustration shows a Cubic NURBS Curve.
Data format:
degree | Degree of the basis function |
params[] | Array of knots |
weights[] | Array of weights for rational NURBS; otherwise, NULL or 1.0 for polynomial b-spline. |
c_pnts[][3] | Array of control points |
Definition:
k = degree of basis function
N = number of knots, degree -2
wi = weights
Ci = control points (x, y, z) * wi
Bi,k = basis functions
By this equation, the number of control points equals N+1.