nurbssurface(3G) nurbssurface(3G)
nurbssurface - controls the shape of a NURBS surface
void nurbssurface(s_knot_count, s_knot, t_knot_count, t_knot,
s_offset, t_offset, ctlarray,
s_order, t_order, type)
long s_knot_count, t_knot_count;
double s_knot[], t_knot[];
long s_offset, t_offset;
double *ctlarray;
long s_order, t_order, type;
s_knot_count expects the number of knots in the parametric s direction.
s_knot expects an array of s_knot_count non-decreasing knot
values in the parametric s direction.
t_knot_count expects the number of knots in the parametric t direction.
t_knot expects an array of t_knot_count non-decreasing knot
values in the parametric t direction.
s_offset expects the offset (in bytes) between successive control
points in the parametric s direction in ctlarray.
t_offset 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 s_offset and t_offset.
s_order 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.
t_order 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 N_V3D, N_V3DR, N_C4D, N_C4DR, and
N_T2D, N_T2DR. Types N_V3D and N_V3DR denote doubleprecision
positional coordinates in a three-dimensional
model space. N_V3D denotes non-rational (3) coordinates
and N_V3DR denotes rational (4) coordinates. Types N_C4D
and N_C4DR denote double-precision color coordinates in a
four-dimensional RGBA color space. N_C4D denotes non
Page 1
nurbssurface(3G) nurbssurface(3G)
rational coordinates and N_C4DR denotes rational
coordinates. Types N_T2D and N_T2DR denote doubleprecision
texture coordinates in a two-dimensional texture
space. N_T2D denotes non-rational coordinates and N_T2DR
denotes rational coordinates.
Use the nurbssurface command within a NURBS (Non-Uniform Rational BSpline)
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 bgnsurface command. To mark the end of a
NURBS surface definition, use the endsurface command. Call nurbssurface
within a NURBS surface definition only.
Positional, texture, and color coordinates are associated by presenting
each as a separate nurbssurface between a bgnsurface/endsurface pair. No
more than one call to nurbssurface for each of color and texture data may
be made within a single bgnsurface/endsurface pair. Exactly one call
must be made to describe position data and it must be the last call to
nurbssurface between the bracketing bgnsurface/endsurface.
bgnsurface();
nurbssurface( ..., N_C4D ); /* color data */
nurbssurface( ..., N_T2D ); /* texture data */
nurbssurface( ..., N_V3D ); /* position data */
endsurface();
You can trim a NURBS surface by using the commands nurbscurve and
pwlcurve between calls to bgntrim and endtrim.
Observe that a nurbssurface with s_knot_count knots in the s direction
and t_knot_count knots in the t direction with orders s_order and t_order
must have (s_knot_count - s_order) x (t_knot_count - t_order) 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.
bgnsurface, nurbscurve, bgntrim, pwlcurve, getnurbsproperty,
setnurbsproperty, texbind
Page 2
nurbssurface(3G) nurbssurface(3G)
nurbssurface commands specifying color or texture coordinates currently
have no effect on IRIS-4D G, GT, GTX, and Personal IRIS.
PPPPaaaaggggeeee 3333 [ Back ]
|