nurbscurve(3G)
nurbscurve - controls the shape of a NURBS curve
Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.
NAME nurbscurve - controls the shape of a NURBS curve C SPECIFICATION void nurbscurve(long knot_count, double knot_list, long double *ctlarray, long order, long type) PARAMETERS knot_count number of knots in knot_list. knot_count equals the number of control points plus the order. knot_list array of knot_count non-decreasing knot values. offset offset (in bytes) between successive curve control points. ctlarray pointer to an array of control points. The coordinates must agree with the type specified below. order order of the NURBS curve. order equals degree + 1, hence, a cubic curve has an order of 4. The maximum order is given by getgdesc (GD_NURBS_ORDER). type type of curve: N_P2D for a polynomial (u,v) trimming curve N_P2DR for a rational (wu,wv,w) trimming curve N_V3D for a polynomial (x,y,z) curve N_V3DR for a rational (x,y,z,w) curve DESCRIPTION Use nurbscurve to describe a NURBS curve. The curve is either a curve in space, or a curve used to trim (define the visible region of) a NURBS surface. Curve types N_V3D and N_V3DR specify curves in space; types N_P2D and N_P2DR specify curves used as trimming curves. Use bgncurve and endcurve to delimit the NURBS curve, unless it is a trimming curve, in which case it will appear within a bgntrim/endtrim block. Specify the knot sequence, the control points and the order of the NURBS curve. You specify trimming regions within a NURBS surface definition (see bgnsurface) to define the visible regions of the NURBS surface. Trimming loops are closed, oriented curves that define the trimming regions. You can describe a trimming loop by using a series of NURBS curves, piecewise linear curves (see pwlcurve), or both. Use bgntrim to mark the beginning of a trimming loop definition; use endtrim to mark the end of a trimming loop definition. The system displays the region of the NURBS surface that is to the left of the trimming curve as the parameter increases. Thus, for a counter- clockwise oriented trimming curve, the region inside the curve is displayed. For a clockwise oriented trimming curve, the region outside the curve is displayed. The offset parameter is used in case the control points are part of an array of larger structure elements. The nurbscurve routine searches for the n-th control point pair or triple beginning at byte address ctlarray + n * offset. See the Graphics Library Programming Guide for a mathematical description of a NURBS curve. EXAMPLE double ctlpts [4] [3] ={ {-.75, -.75, 0.0}, {-.5, .75, 0.0}, {.5, .75, 0.0} {.75, -.75, 0.0} }; double knots[8] = {0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0}; bgncurve() nurbscurve(8, knots, 3*sizeof(double), &ctlpts[0] [0], 4, N_V3D); endcurve(); SEE ALSO bgncurve, bgnsurface, bgntrim, endcurve, endsurface, endtrim, getnurbsproperty, nurbssurface, pwlcurve, setnurbsproperty