.\" @(#)PEXNURBCurve.3 1.5 95/03/24 SMI; .so man3/pex.macs .TH PEXNURBCurve 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXNURBCurve - Non-Uniform Rational B-spline Curve Primitive .SH SYNTAX .HP void PEXNURBCurve\^(\^Display *\fIdisplay\fP\^, XID \fIresource_id\fP\^, PEXOCRequestType \fIreq_type\fP\^, int \fIrationality\fP\^, int \fIorder\fP\^, float *\fIknots\fP\^, unsigned int \fIcount\fP\^, PEXArrayOfCoord \fIpoints\fP\^, double \fItmin\fP\^, double \fItmax\fP\^) .SH PARAMETERS .IP \fIdisplay\fP 1i A pointer to a display structure returned by a successful .B XOpenDisplay call. .IP \fIresource_id\fP 1i The resource identifier of the renderer or structure. .IP \fIreq_type\fP 1i The request type for the output command ( .B PEXOCRender, .B PEXOCStore, .B PEXOCRenderSingle or .B PEXOCStoreSingle ). .IP \fIrationality\fP 1i The type of B-spline curve, whether rational or non-rational ( .B PEXRational or .B PEXNonRational ). .IP \fIorder\fP 1i The order of the polynomial expression. .IP \fIknots\fP 1i An array of floats specifying the B-spline curve knots. .IP \fIcount\fP 1i The number of control points that define the curve. .IP \fIpoints\fP 1i An array of control points defining the B-spline curve. .IP \fItmin\fP 1i The minimum parameter value at which to evaluate the curve. .IP \fItmax\fP 1i The maximum parameter value at which to evaluate the curve. .SH RETURNS .LP None .SH DESCRIPTION .\" indexing .IX PEXNURBCurve .IX "Nurb" "PEXNURBCurve" .LP This function creates a non-uniform B-spline curve output primitive. .LP The curve order is specified as a positive number. .BR PEXGetImpDepConstants (3) can be called to determine the largest supported value for curve order. The spline shape is specified using a list of knots in the parametric coordinate space and a list of control points in modeling coordinates. The number of control points must be at least as large as the order. The number of knots is the sum of the curve order plus the number of control points. The sequence of knots must be non-decreasing, .IP i.e. t(0) <= t(1) <= ... <= t(k-1) .LP where k is the number of knots. .LP If the rationality is .B PEXRational, the control points must be specified in homogeneous (4D) modeling coordinates. PEXlib assumes that 4D modeling coordinates (x,y,z) have already been multiplied by the homogeneous coordinate (w). If the rationality is .B PEXNonRational, the control points must be specified in non-homogeneous (3D) modeling coordinates. .LP Evaluation of the spline is restricted to a specific region in the parametric coordinate space. The parametric limits, tmin and tmax, specify the region in the parametric coordinate space over which the spline is to be evaluated (tmin must be less than tmax). The parametric bounds must also satisfy the restriction tmin >= t(order), tmax <= t(k+1-order). .LP Depending on the ASF attributes, line color, line type, line width and curve approximation attributes are obtained either directly from the current line attributes or from the line bundle. .LP If the specified curve order is not supported, the output primitive is stored in a structure, but when rendered, the primitive is ignored and has no visual effect. .LP Also, the curve order must not be less than one. .SH DATA STRUCTURES .LP .nf typedef union { PEXCoord2D *point_2d; PEXCoord *point; PEXCoord4D *point_4d; .br } PEXArrayOfCoord; /* Pointer to array of points */ .fi .sp .5 See also .B PEXlib.h. .SH ERRORS .TP .SB BadPEXOutputCommand The output command contains an invalid value. .TP .SB BadPEXRenderer The specified renderer resource identifier is invalid. .TP .SB BadPEXStructure The specified structure resource identifier is invalid. .SH SEE ALSO .LP .nf .BR PEXSetLineType (3) .BR PEXSetLineWidth (3) .BR PEXSetLineColorIndex (3) .BR PEXSetLineColor (3) .BR PEXSetLineBundleIndex (3) .BR PEXSetCurveApprox (3) .BR PEXGetImpDepConstants (3) .fi