Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intro_phigs+(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INTRO_PHIGS+(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

INTRODUCTION TO PHIGS+ EXTENSIONS − the introduction to the PHIGS+ Extensions in the SunPHIGS graphics library

DESCRIPTION

The SunPHIGS graphics library offers extensions to PHIGS, including some defined in the PHIGS+ Functional Description, Revision 3.0.  That document describes extensions to the PHIGS standard to support additional output primitives and primitive attributes. 

SunPHIGS Extensions contains a subset of the PHIGS+ functions. This subset supports, among other things, the non-uniform B-spline curve and surface primitives and a subset of their attributes. 

These reference manual pages describe each non-PHIGS function in the SunPHIGS graphics library. Their organization is similar to the SunPHIGS Reference Manual.  Each function is described separately and includes both the C and FORTRAN syntax. 

New Output Primitives

The graphical data produced by PHIGS are output primitives and attributes that are generated from the traversal of structure elements. SunPHIGS Extensions work the same way. 

SunPHIGS Extensions augment the set of PHIGS output primitives by introducing a corresponding set of extended primitives. Some SunPHIGS Extension output primitive structure elements can have variant parameters, whose type can vary on an invocation by invocation basis. The amount and type of information specified is defined by a set of flag parameters for each invocation.  Depending on the primitive being considered, the variant parameters will be some combination of vertex normals, vertex colours, facet normals, facet colours, and edge flags. Special effects or higher quality results can be obtained through the use of this information. If the optional information is not provided by the application, defaults will be calculated or derived from other attributes. 

Non-uniform B-spline Curve
SunPHIGS generates a non-uniform B-spline curve of a user-specified order based on a list of knots in parameter space and a list of control points. Both rational and non-rational curves can be defined. A parameter range can be specified over which the independent variable is evaluated. All attributes that affect a polyline set 3 with data primitive also apply to this primitive. 

Non-uniform B-spline Surface
SunPHIGS generates a non-uniform B-spline surface of two user-specified orders in two independent parameters based on a list of knots for each parameter and a grid of control points. Both rational and nonrational surfaces can be defined.  A rectangular parameter range can be specified over which the independent variables are evaluated. An optional set of trimming curves (non-uniform B-spline curves) can be specified in the parameter space of the surface to limit the space over which the independent variables are evaluated and the B-spline surface is rendered. The edges of this primitive consist of the points on the surface corresponding to specified trimming curves.  If no trimming curves are specified, the edges consist of the curves of constant parameter at the parameter bounds of the surface. All attributes that affect a fill area set 3 with data primitive apply to this primitive. 

Fill Area 3 with Data
SunPHIGS generates a fill area from a single contour which may be empty, hollow, or filled with a colour distribution, a pattern, or a hatch style. The primitive definition can contain any combination of vertex colours, vertex normals, a facet colour, and a facet normal. Colours and normals may be used to light and shade the primitive. Insuring that the points of a fill area are coplanar is the responsibility of the application. The effect produced by nonplanar fill areas is implementation dependent. No edge control is provided for this primitive. All attributes that affect a fill area primitive, plus additional attributes to control lighting and shading, apply to this primitive. 

Fill Area Set 3 with Data
SunPHIGS generates a fill area set from a set of contours which may be empty, hollow, or filled with a colour distribution, a pattern, or a hatch style. The edge of a fill area set consists of the line segments that comprise its defining contours. The primitive definition can contain any combination of vertex colours, vertex normals, a facet normal, a facet colour, and edge visibility flags. Colours and normals may be used to light and shade the primitive. Edge visibility flags determine if individual edges are rendered. Insuring that the points in all contours are coplanar is the responsibility of the application.  The effect produced by nonplanar fill area sets is implementation dependent.  All attributes that affect a fill area set primitive, plus additional attributes to control lighting and shading, apply to this primitive. 

Polyhedron 3 with Data
SunPHIGS generates a group of facets, whose vertices are selected by indexing into a single list of vertices which is part of the primitive definition. The polyhedron primitive requires less data than a corresponding collection of fill area sets, if facets share common vertices. Only vertices and per-vertex data are shared among the facets, while edges and per-edge data are defined independently for each facet. All attributes that affect the representation of a fill area set 3 with data also affect the representation of this primitive.  The primitive definition can contain any combination of vertex colours, vertex normals, facet colours, facet normals, and edge visibility flags.  Colours and normals may be used to light and shade the primitive. Even though the term polyhedron conventionally defines a solid bounded by plane faces, SunPHIGS Extensions does not require that the facets of a polyhedron 3 with data primitive form a closed volume. 

Polyline Set 3 with Data
SunPHIGS generates a set of unconnected polylines defined by a set of point sequences. Each point sequence in the set generates connected line segments. Colour information which may be used for shading the line segments can be specified with each point as part of the primitive definition. All attributes that affect a polyline primitive, plus additional attributes to control lighting and shading, apply to this primitive. 

Quadrilateral Mesh 3 with Data
SunPHIGS generates a sequence of (M-l)×(N-l) quadrilaterals from a two dimensional array of M×N vertices.  A quadrilateral may be nonplanar, in which case the quadrilateral will be rendered as two triangles. The method of decomposing the quadrilateral into triangles is implementation dependent. The edges of this primitive consist of the line segments forming the boundary of each quadrilateral in the mesh. All attributes that affect the representation of fill area set 3 with data also affect the representation of this primitive. The primitive definition can contain any combination of vertex colours, vertex normals, facet colours, and facet normals. Colours and normals may be used to light and shade the primitive. 

Triangle Strip 3 with Data
SunPHIGS generates a sequence of N-2 triangles from N vertices. The K’th triangle contains vertices K, K+1, and K+2.  The edges of a triangle strip are the line segments forming the boundaries of all triangles in the strip. All attributes that affect the representation of a fill area set 3 with data also affect the representation of each triangle in this primitive. The primitive definition can contain any combination of vertex colours, vertex normals, facet colours, and facet normals. Colours and normals may be used to light and shade the primitive. 

New Attributes and Extended Bundle Tables

General Colour
SunPHIGS Extensions support a general colour representation for both direct and indirect colours. In this representation a colour consists of a colour type and a colour value. The colour type indicates whether the colour is direct or indirect. If the colour is indirect, then the colour value is an integer index into the workstation colour table.  If the colour is direct, then the colour type also indicates the specific colour model and the colour value is a triple of real numbers interpreted in the specified colour model. As in PHIGS, four direct colour models are defined: RGB, CIE, HSV, and HLS. 

All SunPHIGS Extensions colour related structure elements and functions utilize the general specification of colours. 

If a specified general colour has a nonsupported colour type, then the general colour defaults to colour type indirect and colour value one, which is the PHIGS default colour index. 

On true colour devices, direct colour is supported in hardware and indirect colour is mapped to direct colour by SunPHIGS.  Cursor colours and PET colours may look different. 

On 8-bit devices, the underlying hardware uses indirect colour and not direct colour. Direct colour may be simulated on these devices, but this simulation may change the appearance and performance of PHIGS applications, and is therefore controlled by the workstation type attribute PHIGS_COLOUR_MODE (see WORKSTATION TYPE SET (3P)). 

For optimal performance and appearance of standard PHIGS features, the default value for PHIGS_COLOUR_MODE is index mode, which does not enable simulation.  In this mode, some SunPHIGS Extension features are not supported, or have different functionality.  General colour with type INDIRECT can be used.  Direct colour is not supported and defaults to colour type INDIRECT, colour index 1.  Lighting and depth cueing are not supported.  SunPHIGS Extension primitives with INDIRECT colour data may be shaded.  This shading is not specified by PHIGS+, but is a SunPHIGS Extension which linearly interpolates colour indices between the specified vertex colours.  For example, if a line has colour index 3 on one vertex, and colour index 7 on the other, it will be shaded with colour indices 4, 5, and 6 in between.  The appearance of these colour indices is controlled by the workstation’s colour table, which may be set by the application (see SET COLOUR REPRESENTATION). In this mode some devices, such as the GP, GP+ and GP2, cannot shade polylines. In these cases, shaded lines are always rendered as if the polyline shading method were NONE (see SET POLYLINE SHADING METHOD). 

Enabling simulation has several effects on 8-bit devices.  Direct colour is supported.  All primitives are rendered using simulation, which means that standard PHIGS primitives may have a different appearance.  The rendering of primitives may be slower.  The effect of setting a colour representation will not appear until the next traversal of the posted structures. (In the workstation description table the dynamic modification flag for SET COLOUR REPRESENTATION will be IRG.) Cursor colours and PET colours may look different. 

The simulation approximates the colour specifed by an application using a special colour map and dithering.  The colour map uses all 256 entries of the hardware colour map so the mouse must be in the PHIGS graphical output area for the correct colours to appear. 

General Interior Style
The set of defined interior styles has been extended to include General. The current interior style index is used as an index into the general interior table. Each table entry contains a general interior type and a data record. The general interior type specifies how the interior of an area defining primitive is to be rendered.  The form of this information is usually unique for each general interior type. 

The only defined general interior type is:

1Isoparametric Curves

General interior type one is intended for parametric surface primitives.  Isoparametric curves are drawn in addition to filling the interior with one of the styles: Hollow, Solid, or Empty.  The data record contains the style of fill and the number of isoparametric curves related to each parameter direction. The number specified may be for the entire parameter range, or the range between each pair of knots in knot based primitives. The tessellation and rendering of the isoparametric curves are controlled by the surface approximation criteria and the polyline attributes, respectively. Nonparametric area defining primitives are rendered by using only the interior style specified in the data record.  The resulting visual priority, in descending order follows: edges, including boundary and trimming curves, isoparametric curves, and the filled interior. 

Parametric Curve Attributes
Parametric curves are affected by the same attributes that affect polylines. In addition, the rendering accuracy of curves is controlled by the curve approximation criteria. An approximation criteria consists of an approximation type and approximation value. The approximation value is interpreted differently for each approximation type. The defined approximation types are listed in the manual entry for the function SET CURVE APPROXIMATION CRITERIA. 

Parametric Surface Attributes
Parametric surfaces are affected by the same attributes that affect fill area sets. In addition, the rendering of surfaces is controlled by the surface approximation criteria. A surface approximation criteria consists of a approximation type and two approximation values.  The approximation values are interpreted differently for each approximation type. The defined approximation types are listed in the manual entry for the function SET SURFACE APPROXIMATION CRITERIA. 

Trimming curves are treated as edges of a surface and they are rendered using edge attributes. In addition, the tessellation of trimming curves is controlled by the trimming curve approximation criteria.  The trimming curve approximation criteria is analogous to the curve approximation criteria, but the approximation type can only be one of implementation dependent, workstation dependent, constant isoparametric subdivision, or constant isoparametric subdivision between knots. 

When the edge flag is OFF, no trimming curves are displayed. When the edge visibility flags are specified as part of the primitive definition and the edge flag is set to ON, the edge visibility flags determine whether the corresponding trimming curve is actually rendered or not. 

New Functions

The following functions are newly defined by PHIGS+ and are implemented as SunPHIGS Extensions. 

ADD TRIMMING CURVE†
COMPUTE FILL AREA SET GEOMETRIC NORMAL
FILL AREA 3 WITH DATA
FILL AREA SET 3 WITH DATA
INQUIRE CURVE AND SURFACE FACILITIES
INQUIRE DEPTH CUE FACILITIES
INQUIRE DEPTH CUE REPRESENTATION
INQUIRE DIRECT COLOUR MODEL FACILITIES
INQUIRE EXTENDED EDGE REPRESENTATION
INQUIRE EXTENDED INTERIOR FACILITIES
INQUIRE EXTENDED INTERIOR REPRESENTATION
INQUIRE EXTENDED PATTERN REPRESENTATION
INQUIRE EXTENDED POLYLINE FACILITIES
INQUIRE EXTENDED POLYLINE REPRESENTATION
INQUIRE EXTENDED POLYMARKER REPRESENTATION
INQUIRE EXTENDED TEXT REPRESENTATION
INQUIRE EXTENDED WORKSTATION STATE TABLE LENGTHS
INQUIRE GENERAL INTERIOR FACILITIES
INQUIRE GENERAL INTERIOR REPRESENTATION
INQUIRE LIGHT SOURCE FACILITIES
INQUIRE LIGHT SOURCE REPRESENTATION
INQUIRE LIST OF DEPTH CUE INDICES
INQUIRE LIST OF GENERAL INTERIOR INDICES
INQUIRE LIST OF LIGHT SOURCE INDICES
INQUIRE PREDEFINED DEPTH CUE REPRESENTATION
INQUIRE PREDEFINED EXTENDED EDGE REPRESENTATION
INQUIRE PREDEFINED EXTENDED INTERIOR REPRESENTATION
INQUIRE PREDEFINED EXTENDED PATTERN REPRESENTATION
INQUIRE PREDEFINED EXTENDED POLYLINE REPRESENTATION
INQUIRE PREDEFINED EXTENDED POLYMARKER REPRESENTATION
INQUIRE PREDEFINED EXTENDED TEXT REPRESENTATION
INQUIRE PREDEFINED GENERAL INTERIOR REPRESENTATION
INQUIRE PREDEFINED LIGHT SOURCE REPRESENTATION
NON-UNIFORM B-SPLINE CURVE
NON-UNIFORM B-SPLINE SURFACE
POLYHEDRON 3 WITH DATA
POLYLINE SET 3 WITH DATA
QUADRILATERAL MESH 3 WITH DATA
SET AREA PROPERTIES
SET BACK AREA PROPERTIES
SET BACK INTERIOR COLOUR
SET BACK INTERIOR REFLECTANCE EQUATION
SET BACK INTERIOR SHADING METHOD
SET BACK INTERIOR STYLE
SET BACK INTERIOR STYLE INDEX
SET CURVE APPROXIMATION CRITERIA
SET DEPTH CUE INDEX
SET DEPTH CUE REPRESENTATION
SET EDGE COLOUR
SET EXTENDED EDGE REPRESENTATION
SET EXTENDED INTERIOR REPRESENTATION
SET EXTENDED PATTERN REPRESENTATION
SET EXTENDED POLYLINE REPRESENTATION
SET EXTENDED POLYMARKER REPRESENTATION
SET EXTENDED TEXT REPRESENTATION
SET FACE CULLING MODE
SET FACE DISTINGUISHING MODE
SET GENERAL INTERIOR REPRESENTATION
SET INTERIOR COLOUR
SET INTERIOR REFLECTANCE EQUATION
SET INTERIOR SHADING METHOD
SET LIGHT SOURCE REPRESENTATION
SET LIGHT SOURCE STATE
SET POLYLINE COLOUR
SET POLYLINE SHADING METHOD
SET POLYMARKER COLOUR
SET SURFACE APPROXIMATION CRITERIA
SET TEXT COLOUR
SET TRIMMING CURVE APPROXIMATION CRITERIA
TRIANGLE STRIP 3 WITH DATA
† FORTRAN only.

Changed Functions

The following functions have been extended to incorporate SunPHIGS Extensions primitives and attributes.  The new versions are fully compatible with the standard PHIGS versions. The updated manual pages for these functions are included in the SunPHIGS Reference Manual. 

ELEMENT SEARCH
INQUIRE CURRENT ELEMENT CONTENT
INQUIRE CURRENT ELEMENT TYPE AND SIZE
INQUIRE ELEMENT CONTENT
INQUIRE ELEMENT TYPE AND SIZE
SET INDIVIDUAL ASF
SET INTERIOR STYLE
WORKSTATION TYPE SET

Limitations

Maximum B-spline Order
The maximum B-spline order supported by any SunPHIGS workstation type is ten.  The maximum trimming curve order supported by any SunPHIGS workstation type is six.  Primitives with greater orders are displayed as described in the manual pages for the functions NON-UNIFORM B-SPLINE CURVE and NON-UNIFORM B-SPLINE SURFACE. 

Supported Curve and Surface Approximation Types
SunPHIGS Extensions supports the following approximation types: workstation dependent and constant parametric subdivision between knots for B-spline curves, B-spline surfaces, and trimming curves.  Specification of other types map to the workstation dependent type during structure traversal.  The workstation dependent type is constant parametric subdivision between knots for all SunPHIGS workstation types. 

In addition to the above non-adaptive curve and surface approximation types, SunPHIGS Extensions supports an adaptive approximation type for parametric curve and surfaces.  Use of this adaptive type will cause the displayed representation of parametric curve and surface primitives to be adjusted according to modelling and viewing transformations.  As the display space used to view the primitive is increased, as in zooming in, the curve or surface will be more finely tessellated.  As the the display space used to view the primitive is reduced, the primitive will be more coarsely tessellated.  This helps the application maintain the smooth appearance of a curve or surface primitive as it is displayed with different modelling and viewing transforms. 

This adaptive approximation type is applied to parametric curves when the current curve approximation type is either Metric in NPC or Chordal Deviation in NPC.  It is applied to parametric surfaces when the current surface approximation type is either Metric in NPC or Planar Deviation in NPC.  The approximation value specifies the maximum size, as a percentage of the workstation viewport, of each tessellated portion of a parametric curve or surface primitive.  In order to not distort the general shape and other features of a curve or surface, the primitive will also be tessellated at positions corresponding to the knot values.  Among other things, this will ensure that any specified discontinuities are reflected in the displayed representation. 

Major changes to the PHIGS+ curve and surface approximation types are currently under consideration by the ANSI and ISO PHIGS+ committees.  Future releases of SunPHIGS will include those changes, which may require changes to, or removal of, the currently supported approximation types. 

CGM Support on PHIGS+ Output Primitives and Attributes:
During generation of CGM, SunPHIGS ignores vertex normals, vertex colours, facet normals, and facet colours, but recognizes vertex coordinates and edge flags of the primitives. CGM workstations also ignore attributes that control lighting, shading, and depth cueing. 

Binding Notes

The SunPHIGS Extensions C and FORTRAN bindings follow the conventions used in the current PHIGS draft bindings.  There are no draft versions of bindings corresponding to revision 3.0 of PHIGS+.  When the bindings become available, SunPHIGS Extensions may replace the bindings listed here with the new ones. The syntax descriptions of the functions listed in this reference manual are subject to change. 

SEE ALSO

COLOUR (7P)
PHIGS TRAVERSAL STATE LIST (7P)
PHIGS WORKSTATION DESCRIPTION TABLE (7P)
INTRO PHIGS (3P)

Sun Release 4.0  —  Last change: 3 August 1989

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