nurbss(3G)
nurbss - controls the shape of a NURBS surface
As shipped in IRIX 6.5.5. Unchanged since IRIX 6.5.
NAME nurbss - controls the shape of a NURBS surface FORTRAN 77 SPECIFICATION subroutine nurbss(sknotcount, s_knot, tknotcount, t_knot, + soffset, toffset, ctlarray, sorder, torder, type) integer*4 sknotcount, tknotcount double precision sknot(sknotcount), tknot(tknotcount) integer*4 soffset, toffset double precision ctlarray(*) integer*4 sorder, torder, type PARAMETERS sknotcount expects the number of knots in the parametric s direction. sknot expects an array of sknotcount non-decreasing knot values in the parametric s direction. tknotcount expects the number of knots in the parametric t direction. tknot expects an array of tknotcount non-decreasing knot values in the parametric t direction. soffset expects the offset (in bytes) between successive control points in the parametric s direction in ctlarray. toffset expects the offset (in bytes) between successive control points in the parametric t direction in ctlarray. ctlarray expects an array containing control points for the NURBS surface. The coordinates must appear as either (x, y, z) triples or as (wx, wy, wz, w) quadruples. The offsets between successive control points in the parametric s and t directions are given by soffset and toffset. sorder expects the order of the NURBS surface in the parametric s direction. The order is one more than the degree, hence, a cubic surface has an order of 4. torder expects the order of the NURBS surface in the parametric t direction. The order is one more than the degree, hence, a cubic surface has an order of 4. type expects a value indicating the control point type. Current options are NV3D, NV3DR, NC4D, NC4DR, and NT2D, NT2DR. Types NV3D and NV3DR denote double-precision positional coordinates in a three-dimensional model space. NV3D denotes non-rational (3) coordinates and NV3DR denotes rational (4) coordinates. Types NC4D and NC4DR denote double-precision color coordinates in a four- dimensional RGBA color space. NC4D denotes non-rational coordinates and NC4DR denotes rational coordinates. Types NT2D and NT2DR denote double-precision texture coordinates in a two-dimensional texture space. NT2D denotes non- rational coordinates and NT2DR denotes rational coordinates. DESCRIPTION Use the nurbss command within a NURBS (Non-Uniform Rational B-Spline) surface definition to describe the shape of a NURBS surface before any trimming takes place. To mark the beginning of a NURBS surface definition, use the bgnsur command. To mark the end of a NURBS surface definition, use the endsur command. Call nurbss within a NURBS surface definition only. Positional, texture, and color coordinates are associated by presenting each as a separate nurbss between a bgnsur/endsurf pair. No more than one call to nurbss for each of color and texture data may be made within a single bgnsur/endsurf pair. Exactly one call must be made to describe position data and it must be the last call to nurbss between the bracketing bgnsur/endsurf. EXAMPLE call bgnsur call nurbss( ..., N_C4D ) call nurbss( ..., N_T2D ) call nurbss( ..., N_V3D ) call endsur You can trim a NURBS surface by using the commands nurbsc and pwlcur between calls to bgntri and endtri. Observe that a nurbss with sknotcount knots in the s direction and tknotcount knots in the t direction with orders sorder and torder must have (sknotcount - sorder) x (tknotcount - torder) control points. The system renders a NURBS surface as a polygonal mesh and analytically calculates normal vectors at the corners of the polygons within the mesh. Therefore, your code should specify a lighting model when it uses NURBS surfaces. Otherwise, you loose all the interesting surface information. Use lmdef and lmbind to define or modify materials and their properties. See the Graphics Library Programming Guide for a mathematical description of a NURBS surface. SEE ALSO bgnsur, nurbsc, bgntri, pwlcur, setnur, getnur, texbin NOTE nurbss commands specifying color or texture coordinates currently have no effect on IRIS-4D G, GT, GTX, and Personal IRIS.