SunPHIGS 3.0 Extensions Reference Manual
  Search only this book
Download this book in PDF

NAME

INTRODUCTION TO SUNPHIGS EXTENSIONS - the introduction to the PHIGS PLUS Extensions in the SunPHIGS graphics library

DESCRIPTION

The SunPHIGS graphics library offers extensions to PHIGS, including many defined in the document: Draft proposed PHIGS PLUS, ISO/ IECSC24-N454 (20 March 1990). That document describes extensions to the PHIGS standard to support additional output primitives and primitive attributes.
SunPHIGS Extensions contains a subset of the PHIGS PLUS functions. This subset includes support for lighting, shading, depth-cueing, and additional primitives.
These reference manual pages describe each non-PHIGS function in the SunPHIGS graphics library. Their organization is similar to the Sun PHIGSReference Manual. Each function is described separately and includes 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 are 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 are 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 non-rational 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, then 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 Set 3 with Data
SunPHIGS generates a fill area set from a set of contours that can 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 can be used to light and shade the primitive. Edge visibility flags determine if individual edges are rendered. Ensuring that the points in all contours are coplanar is the responsibility of the application. The effect produced by non-planar 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.
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 that 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 twodimensional array of M.N vertices. A quadrilateral may be nonplanar, in which case the quadrilateral is 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 can be used to light and shade the primitive.
Set of fill Area Set 3 with Data (SOFAS)
SunPHIGS generates a group of facets, whose vertices are selected by indexing to a single list of vertices that is part of the primitive definition. The SOFAS 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 can 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 can be used to light and shade the primitive.

New Attributes and Extended Bundle

General Colour
SunPHIGS Extensions support a general colour representation for 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 to 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 .

Tables


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.
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 can be simulated on these devices, but it may change the appearance and performance of PHIGS application, and is, therefore, controlled by the workstation type attribute PHIGS_COLOUR_MODE (see WORKSTATION TYPE SET (3P)).
If PHIGS_COLOUR_MODE is index, some SunPHIGS Extension features are not supported, or they 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 PLUS, but is a SunPHIGS Extension that 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, then 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 can be set by the application (see SET COLOUR REPRESENTATION).
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 does 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 specified by an application using a special colour map and dithering. The colour map uses 228 entries of the hardware colour map, so the mouse may need to be in the PHIGS graphical output area for the correct colours to appear.
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 an 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 SET SURFACE APPROXIMATION CRITERIA function.
Parametric surfaces are also affected by parametric surface characteristics. The parametric surface characteristics can be used to further specify the appearance of parametric surfaces beyond those aspects associated with fill area sets, such as isoparametric and level curves. The parametric surface characteristics aspect consists of a type and a data record. The content of the data record is unique for each type. The defined surface characteristics types are listed in the manual entry for the SET PARAMETRIC SURFACE CHARACTERISTICS function.
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, which is analogous to the curve approximation criteria, with the following exception; the approximation type can be only one of the following: implementation-dependent, workstationdependent, 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.

New Functions

The following functions are implemented as SunPHIGS Extensions:
ADD TRIMMING CURVE.
add_trimming_curve (3PP)
CELL ARRAY 3 PLUS
cell_array_3_plus (3PP)
COMPUTE FILL AREA SET GEOMETRIC NORMAL
compute_fill_area_set_geometric_normal (3PP)
COPY ELEMENT RANGE
copy_element_range (3PP)
COPY ELEMENTS BETWEEN LABELS
copy_elements_between_labels (3PP)
FILL AREA SET 3 WITH DATA
fill_area_set_3_with_data (3PP)
INQUIRE COLOUR MAPPING FACILITIES
inquire_colour_mapping_facilities (3PP)
INQUIRE COLOUR MAPPING METHOD FACILITIES
inquire_colour_mapping_method_facilities (3PP)
INQUIRE COLOUR MAPPING REPRESENTATION
inquire_colour_mapping_representation (3PP)
INQUIRE CURVE AND SURFACE FACILITIES
inquire_curve_and_surface_facilities (3PP)
INQUIRE DEPTH CUE FACILITIES
inquire_depth_cue_facilities (3PP)
INQUIRE DEPTH CUE REPRESENTATION
inquire_depth_cue_representation (3PP)
INQUIRE DIRECT COLOUR MODEL FACILITIES
inquire_direct_colour_model_facilities (3PP)
INQUIRE DYNAMICS OF WORKSTATION ATTRIBUTES PLUS
inquire_dynamics_of_workstation_attributes_plus (3PP)
INQUIRE EDGE REPRESENTATION PLUS
inquire_edge_representation_plus (3PP)
INQUIRE INTERIOR FACILITIES PLUS
inquire_interior_facilities_plus (3PP)
INQUIRE INTERIOR REPRESENTATION PLUS
inquire_interior_representation_plus (3PP)
INQUIRE LIGHT SOURCE FACILITIES
inquire_light_source_facilities (3PP)
. FORTRAN only.
INQUIRE LIGHT SOURCE REPRESENTATION
inquire_light_source_representation (3PP)
INQUIRE LIST OF COLOUR MAPPING INDICES
inquire_list_of_colour_mapping_indices (3PP)
INQUIRE LIST OF DEPTH CUE INDICES
inquire_list_of_depth_cue_indices (3PP)
INQUIRE LIST OF LIGHT SOURCE INDICES
inquire_list_of_light_source_indices (3PP)
INQUIRE PATTERN REPRESENTATION PLUS
inquire_pattern_representation_plus (3PP)
INQUIRE POLYLINE FACILITIES PLUS
inquire_polyline_facilities_plus (3PP)
INQUIRE POLYLINE REPRESENTATION PLUS
inquire_polyline_representation_plus (3PP)
INQUIRE POLYMARKER REPRESENTATION PLUS
inquire_polymarker_representation_plus (3PP)
INQUIRE PREDEFINED COLOUR MAPPING REPRESENTATION
inquire_predefined_colour_mapping_representation (3PP)
INQUIRE PREDEFINED DEPTH CUE REPRESENTATION
inquire_predefined_depth_cue_representation (3PP)
INQUIRE PREDEFINED EDGE REPRESENTATION PLUS
inquire_predefined_edge_representation_plus (3PP)
INQUIRE PREDEFINED INTERIOR REPRESENTATION PLUS
inquire_predefined_interior_representation_plus (3PP)
INQUIRE PREDEFINED LIGHT SOURCE REPRESENTATION
inquire_predefined_light_source_representation (3PP)
INQUIRE PREDEFINED PATTERN REPRESENTATION PLUS
inquire_predefined_pattern_representation_plus (3PP)
INQUIRE PREDEFINED POLYLINE REPRESENTATION PLUS
inquire_predefined_polyline_representation_plus (3PP)
INQUIRE PREDEFINED POLYMARKER REPRESENTATION PLUS
inquire_predefined_polymarker_representation_plus (3PP)
INQUIRE PREDEFINED TEXT REPRESENTATION PLUS
inquire_predefined_text_representation_plus (3PP)
INQUIRE RENDERING COLOUR MODEL FACILITIES
inquire_rendering_colour_model_facilities (3PP)
INQUIRE TEXT REPRESENTATION PLUS
inquire_text_representation_plus (3PP)
INQUIRE WORKSTATION STATE TABLE LENGTHS PLUS
inquire_workstation_state_table_lengths_plus (3PP)
NON-UNIFORM B-SPLINE CURVE
non-uniform_b-spline_curve (3PP)
NON-UNIFORM B-SPLINE SURFACE
non-uniform_b-spline_surface (3PP)
OPEN XPHIGS
open_xphigs (3PP)
POLYLINE SET 3 WITH DATA
polyline_set_3_with_data (3PP)
QUADRILATERAL MESH 3 WITH DATA
quadrilateral_mesh_3_with_data (3PP)
SET BACK INTERIOR COLOUR
set_back_interior_colour (3PP)
SET BACK INTERIOR REFLECTANCE EQUATION
set_back_interior_reflectance_equation (3PP)
SET BACK INTERIOR SHADING METHOD
set_back_interior_shading_method (3PP)
SET BACK INTERIOR STYLE
set_back_interior_style (3PP)
SET BACK INTERIOR STYLE INDEX
set_back_interior_style_index (3PP)
SET BACK REFLECTANCE PROPERTIES
set_back_reflectance_properties (3PP)
SET COLOUR MAPPING INDEX
set_colour_mapping_index (3PP)
SET COLOUR MAPPING REPRESENTATION
set_colour_mapping_representation (3PP)
SET CURVE APPROXIMATION CRITERIA
set_curve_approximation_criteria (3PP)
SET DEPTH CUE INDEX
set_depth_cue_index (3PP)
SET DEPTH CUE REPRESENTATION
set_depth_cue_representation (3PP)
SET EDGE COLOUR
set_edge_colour (3PP)
SET EDGE REPRESENTATION PLUS
set_edge_representation_plus (3PP)
SET ELEMENT POINTER AT PICK IDENTIFIER
set_element_pointer_at_pick_identifier (3PP)
SET FACE CULLING MODE
set_face_culling_mode (3PP)
SET FACE DISTINGUISHING MODE
set_face_distinguishing_mode (3PP)
SET INTERIOR COLOUR
set_interior_colour (3PP)
SET INTERIOR REPRESENTATION PLUS
set_interior_representation_plus (3PP)
SET INTERIOR SHADING METHOD
(set_interior_shading_method3PP)
SET LIGHT SOURCE REPRESENTATION
set_light_source_representation (3PP)
SET LIGHT SOURCE STATE
set_light_source_state (3PP)
SET OF FILL AREA SET 3 WITH DATA
set_of_fill_area_set_3_with_data (3PP)
SET PARAMETRIC SURFACE CHARACTERISTICS
set_parametric_surface_characteristics (3PP)
SET PATTERN REPRESENTATION PLUS
set_pattern_representation_plus (3PP)
SET POLYLINE COLOUR
set_polyline_colour (3PP)
SET POLYLINE REPRESENTATION PLUS
set_polyline_representation_plus (3PP)
SET POLYLINE SHADING METHOD
set_polyline_shading_method (3PP)
SET POLYMARKER COLOUR
set_polymarker_colour (3PP)
SET POLYMARKER REPRESENTATION PLUS
set_polymarker_representation_plus (3PP)
SET REFLECTANCE EQUATION
set_reflectance_equation (3PP)
SET REFLECTANCE PROPERTIES
set_reflectance_properties (3PP)
SET SURFACE APPROXIMATION CRITERIA
set_surface_approximation_criteria (3PP)
SET TEXT COLOUR
set_text_colour (3PP)
SET TEXT REPRESENTATION PLUS
set_text_representation_plus (3PP)
TRIANGLE STRIP 3 WITH DATA
triangle_strip_3_with_data (3PP)

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 Sun PHIGS 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
WORKSTATION TYPE SET

Limitations

Maximum B-spline Order
The maximum B -splineorder 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: workstationdependent 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 workstationdependent 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 adjusts the displayed representation of parametric curve and surface primitives according to modelling and viewing transformations. As the display space used to view the primitive is increased, as when zooming in, the curve or surface is more finely tessellated. As the the display space used to view the primitive is reduced, the primitive is 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. The primitive is also tessellated at positions corresponding to the knot values to eliminate distortion of the general shape and other features of a curve or surface. Among other things, this ensures that any specified discontinuities are reflected in the displayed representation.
Major changes to the PHIGS PLUS curve and surface approximation types are currently under consideration by the ANSI and ISO PHIGS PLUS 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 PLUS 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 International Standard PHIGS bindings. Since PHIGS PLUS is not yet standardized, there are no standard bindings for PHIGS PLUS. When the bindings become available, SunPHIGS Extensions may replace the bindings listed here with 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 (3P)
INTRO PHIGS (3P)
INTRO (7P)