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

pwlcurve Subroutine

Purpose

Describes a piecewise linear trimming curve for NURBS surfaces.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void pwlcurve
(Int32 count,
Float64 *data_array,
Int32 stride,
Int32 type)

FORTRAN Syntax

SUBROUTINE PWLCUR(count, data_array, stride, type)
INTEGER*4 count, stride, type
REAL*8 data_array(*)

Description

The pwlcurve subroutine describes a piecewise linear curve, which consists of a list of coordinate pairs in the parameter space for a Non-Uniform Rational B-Spline (NURBS) surface. A piecewise linear curve can be used to describe a trimming loop. Use trimming loop definitions within surface definitions, as defined by the bgnsurface subroutine.

The trimming loops are closed curves that the system uses to set the boundaries of a NURBS surface. Describe a trimming loop by using a series of NURBS curves (as defined by the nurbscurve subroutine), piecewise linear curves, or both. These points are connected together with straight lines to form a path.

If a piecewise linear curve is an approximation to a real curve, the points should be close enough together that the resulting path will appear curved at the resolution used in the application.

Use piecewise linear curves within trimming loop definitions. A trimming loop definition is a set of oriented curve commands that describe a closed loop. To mark the beginning of a trimming loop definition, use the bgntrim subroutine. To mark the end of a trimming loop definition, use an endtrim subroutine.

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.

Parameters

count Specifies the number of points on the curve.
data_array Specifies an array containing the curve points.
stride Specifies the offset (in bytes) between points on the curve.
type Specifies a value indicating the point type. Currently, the only data type supported is N_ST, corresponding to pairs of s-t coordinates. The stride parameter is used in case the curve points are part of an array of larger structure elements. The pwlcurve subroutine searches for the count-th coordinate pair beginning at data_array + count * stride.

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 trimming loop with the bgntrim and endtrim subroutines.

Marking the beginning and end of a NURBS surface definition with the bgnsurface and endsurface 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.

Controlling the shape of a NURBS surface with the nurbssurface 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 ]