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

nurbscurve Subroutine

Purpose

Controls the shape of a NURBS trimming curve.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void nurbscurve
(Int32 knot_count,
Float64 knot_list[ ],
Int32 stride,
Float64 *ctlarray,
Int32 order,
Int32 type)

FORTRAN Syntax

SUBROUTINE NURBSC(knot_count, knot_list,
         stride, ctlarray, order, type)
INTEGER*4 knot_count, stride, order, type
REAL*8 knot_list(knot_count), ctlarray(*)

Description

The nurbscurve subroutine describes a Non-Uniform Rational B-Spline (NURBS) curve. Use NURBS curves within trimming loop definitions. To mark the beginning and end of a trimming loop definition, use the bgntrim and endtrim subroutines.

Use trimming loop definitions within NURBS surface definitions, as defined by the bgnsurface subroutine. Describe a trimming loop by using a series of NURBS curves, piecewise linear curves (as defined by the pwlcurve subroutine), or both.

The system displays the region of the NURBS surface that is to the left of the trimming curves as the parameter increases. Thus, for a counterclockwise-oriented trimming curve, the displayed region of the NURBS surface is the region inside the curve. For a clockwise-oriented trimming curve, the displayed region of the NURBS surface is the region outside the curve.

The stride parameter is used when the control points are part of an array of larger structure elements. The nurbscurve subroutine searches for the nth control point pair or triple beginning at byte address:

*(ctlarray + n x stride)

Parameters

knot_count Specifies the number of knots.
knot_list Specifies an array of knot_count nondecreasing knot values.
stride Specifies the offset (in bytes) between successive curve control points.
ctlarray Specifies an array containing control points for the NURBS curve. The coordinates must appear as either (x, y) pairs or as (x, y, w) triples. The offset between successive control points is given by stride.
order Specifies the order of the NURBS curve. The order is one more than the degree, hence, a cubic curve has an order of 4.
type Specifies a value indicating the control point type. Current options are as follows:
C FORTRAN Description
N_ST NST Indicates 2-dimensional control points.
N_STW NSTW Indicates 3-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 untrimmed NURBS surface with the nurbssurface 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 ]