Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

NON-UNIFORM B-SPLINE SURFACE(3P+)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

NON-UNIFORM B-SPLINE SURFACE − create a non-uniform B-spline surface structure element

SYNOPSIS

C Syntax

pnuni_bsp_surf ( uorder, vorder, uknots, vknots, rationality, grid, nloops, tloops )
Pintuorder;U spline order
Pintvorder;V spline order
Pfloat_list∗uknots;U knots
Pfloat_list∗vknots;V knots
Prationalrationality;rationality selector
Ppoint_grid34∗grid;grid of 3D or 4D control points
Pintnloops;number of trim curve loops
Ptrimcurve_list∗tloops; trim curve loops

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

NON-UNIFORM B-SPLINE SURFACE creates a structure element containing the definition of a non-uniform B-spline surface. 

C Input Parameters

uorder, vorder
Order of the surface in the u and v dimensions, respectively. 

uknots, vknots
Pointers to Pfloat_list structures listing the knots for the u and v dimensions of the surface.  Pfloat_list is defined in phigs.h as follows:

typedef struct {
Pintnum_floats;/∗ number of Pfloats in list ∗/
Pfloat∗floats;/∗ list of floats ∗/
} Pfloat_list;

rationality
The rationality selector.  Prational is defined in phigs.h as follows:

typedef enum {
PNON_RATIONAL = 0,
PRATIONAL = 1
} Prational;

gridPointer to a Ppoint_grid34 structure containing the surface control points.  Ppoint_grid34 is defined in phigs.h as follows:

typedef struct {/∗ grid of 3D or 4D points, [u_dim] [v_dim] ∗/
    Ppcs_dimsnum_points; /∗ number of points in each dimension ∗/
    union {
Ppoint3∗point3d;/∗ array of 3D points ∗/
Ppoint4∗point4d;/∗ array of 4D points ∗/
    } points;
} Ppoint_grid34;

Ppcs_dims is defined in phigs.h as:

typedef struct {
Pintu_dim;/∗ dimension (number of divisions) along u ∗/
Pintv_dim;/∗ dimension (number of divisions) along v ∗/
} Ppcs_dims;

Ppoint3 is defined in phigs.h as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;

Ppoint4 is defined in phigs.h as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
Pfloatw; /∗ w coordinate ∗/
} Ppoint4;

nloopsNumber of trimming curve loops. 

tloopsA pointer to an array of Ptrimcurve_list structures that specifies the trimming curve loops. Each of these structures contains the specification of an individual trimming curve loop (set of trimming curves).  Ptrimcurve_list is defined in phigs.h as:

typedef struct {
Pintnum_curves;/∗ number of trimming curves in list ∗/
Ptrimcurve∗curves;/∗ list of curves ∗/
N
} Ptrimcurve_list;

Ptrimcurve is defined in phigs.h as:

typedef struct {
Pedge_flagvisible;/∗ curve visibility flag ∗/
Prationalrationality;/∗ rationality ∗/
Pintorder;/∗ curve order ∗/
Pintapprox_type /∗ approximation type ∗/
Pfloatapprox_val/∗ approximation value ∗/
Pfloat_listknots;/∗ curve knot vector ∗/
Pfloattmin, tmax;/∗ curve parameter range ∗/
Ppoint_list23cpts;/∗ control points ∗/
} Ptrimcurve;

Pedge_flag is defined in phigs.h as:

typedef enum {
PEDGE_OFF,
PEDGE_ON
} Pedge_flag;

Prational is defined in phigs.h as:

typedef enum {
PNON_RATIONAL = 0,
PRATIONAL = 1
} Prational;

Pfloat_list is defined in phigs.h as:

typedef struct {
Pintnum_floats;/∗ number of Pfloats in list ∗/
Pfloat∗floats;/∗ list of floats ∗/
} Pfloat_list;

Ppoint_list23 is defined in phigs.h as:

typedef struct { /∗ list of 2D or 3D points ∗/
Pintnum_points;/∗ number of points ∗/
union {
Ppoint∗point2d;/∗ array of 2D points ∗/
Ppoint3∗point3d;/∗ array of 3D points ∗/
} points;
} Ppoint_list23;

The point3d member of the points union is used if the rationality member of Ptrimcurve is PRATIONAL; otherwise, the point2d member is used.  Ppoint is defined in phigs.h as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;

Ppoint3 is defined in phigs.h as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;

Execution

Depending on the edit mode, a NON-UNIFORM B-SPLINE SURFACE element is either inserted into the open structure after the element pointer, or replaces the element pointed at by the element pointer.  The element pointer is then updated to point to this NON-UNIFORM B-SPLINE SURFACE structure element. 

The surface u and v orders must be positive integers.  Surfaces of unsupported orders in either dimension will be displayed by drawing the control grid; that is, the corresponding surface of order 2 in both dimensions. 

The u and v knots must each form a non-decreasing sequence of numbers. 

The rationality selector parameter may have the enumerated value Rational or Non-rational.  When Rational is specified, the control points must be specified as 4D homogeneous modelling coordinates. When Non-rational is specified, the control points are 3D PHIGS modelling coordinates. 

The number of control points in the u and v directions must be at least as large as the corresponding order.  The number of control points in each direction plus the corresponding spline order must be equal to the corresponding number of knots. 

At structure traversal time, a NON-UNIFORM B-SPLINE SURFACE primitive is drawn using the attributes that apply to FILL AREA SET 3 primitives, plus the extended interior attributes.  See SET INTERIOR REPRESENTATION PLUS for a listing of these. 

Trimming Curves

The surface parameter area to be rendered may be defined by trimming curves.  The trimming definition of a surface consists of a list of loops.  Each of these loops is a list of one or more trimming curves. Each trimming curve is a non-uniform rational B-spline curve defined in the 2D parameter space of the surface.  The curves of a loop connect in a head-to-tail fashion. Each loop must be explicitly closed. 

The restrictions on trimming curves are the same as those for non-uniform B-spline curves, and are specified in the function NON-UNIFORM B-SPLINE CURVE. 

The trimming curves associated with a surface can touch each other only at their end points. No other pair of trimming curves can connect at that same point. A trimming curve cannot be self-touching or self-intersecting. 

If trimming curves are specified, then they define the edges of the surface.  Each trimming curve has a flag that controls its visibility.  These visibility flags have lower precedence than the edge flag attribute and are ignored if the edge flag attribute is set to OFF. 

PHIGS PLUS restricts trimming loops of a single surface primitive to a certain canonical form. This form must redundantly identify the interior parameter area in two different ways: according to the odd winding and the curve handedness rules. 

Attributes Applied

The attributes listed below are used to display the NON-UNIFORM B-SPLINE SURFACE primitive when the structure is traversed. The Aspect Source Flags (ASFs) tell where to access the output display attributes.  These attributes can come directly from the pipline context, or they can be accessed indirectly, using the appropriate index in the pipline context and the corresponding bundled representation in the PHIGS workstation state list. 

interior colourinterior colour index ASF
back interior colourback interior colour ASF
interior styleinterior style ASF
back interior styleback interior style ASF
interior style indexinterior style index ASF
back interior style indexback interior style index ASF
interior shading methodinterior shading method ASF
back interior shading methodback interior shading method ASF
interior reflectance equation interior reflectance equation ASF
back interior reflectance equationback interior reflectance equation ASF
area propertiesarea properties ASF
back area propertiesback area properties ASF
interior index
edge colouredge colour index ASF
edge flagedge flag ASF
edgetypeedgetype ASF
edgewidth scale factoredgewidth scale factor ASF
surface approximation criteriasurface approximation criteria ASF
trimming curve approximation criteriatrimming curve approximation criteria ASF
edge index
face distinguishing mode
face culling mode
depth cue index
light source state
name set

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

600Ignoring function, not enough control points for specified order

601Ignoring function, knot sequence is not non-decreasing

602Ignoring function, order is inconsistent with number of knots and control points specified

SEE ALSO

SET SURFACE APPROXIMATION CRITERIA (3P+)
NON-UNIFORM B-SPLINE CURVE (3P+)
SET INTERIOR REPRESENTATION PLUS (3P+)
INQUIRE CURVE AND SURFACE FACILITIES (3P+)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026