Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

DoBackfaceCullSwitch(3D)

DoBackfaceCullable(3D)

DoNURBSurf(3D)

VertexTypes(3D)

DoPatch(3D)  —  Kubota Pacfic Computer Inc. (\*(Dd)

NAME

DoPatch − Create a patch primitive object

SYNOPSIS

C:

DtObject DoPatch(colormodel, vertextype, matrixl,
vertices, matrixr)
DtColorModel colormodel;
DtVertexType vertices;
DtObject matrixl;
DtObject matrixr;
DtReal vertices[];

FORTRAN:

INTEGER∗4 DOPAT(COLMOD, VTXTYP, MATRXL,
VTXS, MATRXR)
INTEGER∗4 COLMOD
INTEGER∗4 VTXTYP
INTEGER∗4 MATRXL
INTEGER∗4 MATRXR
REAL∗8 VTXS(∗)

DESCRIPTION

DoPatch creates a patch primitive object.  The patch type is determined by the pair of matrices used.  These matrices could be DcBezier4 <DCMXB4>, DcHermite4 <DCMXH4>, or DcBSpline4 <DCMXBS>.  The user may specify a non-standard matrix object with DoMatrix <DOM>. 

The parameter colormodel specifies the color model if the control points specify color for shading purposes.  The parameter vertextype specifies the nature of the control points; only types DcLoc <DCL> and DcLocClr <DCLC> are allowed.  FORTRANr more information, refer to Chapter 6, Doré Vertex Types, in the Doré Reference Manual or to the VertexTypes on-line manual page.) 

The patch is defined by the list of control points in the parameter vertices.  The area for the patch control points in control space is always 0.0 to 1.0 in each direction. 

By allowing different matrices to be specified for both the left (matrixl) and right (matrixr) matrices, both the size and type of parameterization in each direction can be individually controlled.  If the same matrix type is specified for both matrices, then the entire patch will be of that type; the right matrix is internally transposed before use.  The order is determined by the dimension of each matrix, i.e, the number of vertices in that direction.  The degree will always be one less than this number.  FORTRAN array element FOO(j+1,i+1). 

The use of the matrices follows this equation:
 
P(u,v) = [1 u u2 u3 ... ] ∗ matrixl ∗ vertices ∗ matrixrT ∗ [1 v v2 v3 ... ]T
 
If this primitive object defines a closed surface or will be oriented with backfacing parts of the surface away from the viewer, then backface culling may speed up the rendering time.  See DoBackfaceCullable and DoBackfaceCullSwitch. 

ERRORS

DoPatch will fail if the vertex type is not DcLoc or DcLocClr. 

[WARNING - bad vertex type]

DoPatch will fail if an invalid matrix object is specified. 

[WARNING - invalid matrix object handle]

DoPatch will fail if a non-square matrix is specified. 

[WARNING - non square matrix]

SEE ALSO

DoBackfaceCullSwitch(3D), DoBackfaceCullable(3D), DoNURBSurf(3D), VertexTypes(3D)

September 02, 1992

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