[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

nurbssurface Subroutine

Purpose

Controls the shape of a NURBS surface

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void nurbssurface
(Int32 s_knot_count,
Float64 s_knots[],
Int32 t_knot_count,
Float64 t_knots[],
Int32 s_stride,
Int32 t_stride,
Float64 *ctlarray,
Int32 s_order,
Int32 t_order,
Int32 type)

FORTRAN Syntax

SUBROUTINE NURBSS(s_knot_count,
s_knots, t_knot_count, t_knots, s_stride,
t_stride, ctlarray, s_order, t_order, type)
INTEGER*4 s_knot_count, t_knot_count
REAL*8 s_knots(s_knot_count)
REAL*8 t_knots(t_knot_count)
INTEGER*4 s_stride, t_stride
INTEGER*4 s_order, t_order, type
REAL*8 ctlarray(*)

Description

The nurbssurface subroutine controls the shape of a Non-Uniform Rational B-Spline (NURBS) surface. Use this subroutine within a NURBS surface definition to describe the shape of a NURBS surface before any trimming takes place. To mark the beginning and end of a NURBS surface definition, use the bgnsurface and endsurface subroutines. Call the nurbssurface subroutine only within a NURBS surface definition.

You can trim a NURBS surface by using the nurbscurve and pwlcurve subroutines between calls to the bgntrim and endtrim subroutines.

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 program should specify a lighting model when it uses NURBS surfaces, otherwise much detailed surface information is lost. Use the lmdef and lmbind subroutines to define or modify materials and their properties.

Note: If backfacing is on, the system cannot correctly eliminate backfacing polygons on the surface.

Parameters

s_knot_count Specifies the number of knots in the parametric s direction.
s_knots Specifies an array of s_knot_count nondecreasing knot values in the parametric s direction.
t_knot_count Specifies the number of knots in the parametric t direction.
t_knots Specifies an array of t_knot_count nondecreasing knot values in the parametric t direction.
s_stride Specifies the offset (in bytes) between successive control points in the parametric s direction in ctlarray.
t_stride Specifies the offset (in bytes) between successive control points in the parametric t direction in ctlarray.
ctlarray Specifies an array containing control points for the NURBS surface. The coordinates must appear as either (x, y, z) triples or as (x, y, z, w) quadruples. The offsets between successive control points in the parametric s and t directions are given by s_stride and t_stride.
s_order Specifies the order of the NURBS surface in the parametric s direction. The order is one more than the degree, so a cubic surface has an order of 4.
t_order Specifies the order of the NURBS surface in the parametric t direction. The order is one more than the degree, so a cubic surface has an order of 4.
type Specifies a value indicating the control point type. Current options are:
C FORTRAN Description
N_XYZ NXYZ Indicates 3-dimensional control points.
N_XYZW NXYZW Indicates 4-dimensional (rational) control points.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Marking the beginning and end of a NURBS surface definition with the bgnsurface and endsurface subroutines.

Marking the beginning and end of a NURBS surface trimming loop with the bgntrim and endtrim subroutines.

Returning the current value of a trimmed NURBS surfaces display property with the getnurbsproperty subroutine.

Controlling the shape of a NURBS trimming curve with the nurbscurve subroutine.

Describing a piecewise linear trimming curve for NURBS surfaces with the pwlcurve subroutine.

Setting a property for the display of trimmed NURBS with the setnurbsproperty subroutine.

AIX Graphics Library Overview and Drawing NURBS Curves and Surfaces.


[ Previous | Next | Contents | Glossary | Home | Search ]