Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ psetsurfapprox(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET SURFACE APPROXIMATION CRITERIA(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

SET SURFACE APPROXIMATION CRITERIA − create a structure element to set the surface approximation criteria

SYNOPSIS

C Syntax

void
psetsurfapprox ( type, uvalue, vvalue )
Pinttype;approximation type
Pfloatuvalue;approximation value for u dimension
Pfloatvvalue;approximation value for v dimension

FORTRAN Syntax

SUBROUTINE pssapx ( TYPE, UVAL, VVAL )
INTEGERTYPEapproximation type
REALUVALapproximation value for u dimension
REALVVALapproximation value for v dimension

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

SET SURFACE APPROXIMATION CRITERIA places into the currently open structure a structure element that specifies the surface approximation type and values.  The surface approximation type controls the display precision of non-uniform B-spline surfaces by specifying the method to use to render the surface.  The approximation values are used in a type-specific way, as described in the Execution section below. 

When the current surface approximation criteria Aspect Source Flag (ASF) is set to INDIVIDUAL, the current value of this attribute defines the surface approximation criteria to be applied to the following output primitives:

• NON-UNIFORM B-SPLINE CURVE

This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard. 

C Input Parameters

All of the following data types are predefined in phigs.h. 

typeThe surface approximation type.  Predefined values are:

0PSURF_WS_DEP
1PSURF_CONSTANT_PARAMETRIC
2PSURF_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3PSURF_METRIC_WC
4PSURF_METRIC_NPC
5PSURF_PLANAR_DEVIATION_WC
6PSURF_PLANAR_DEVIATION_NPC

uvalue, vvalue
The values to use when applying the specified approximation method. Valid values depend on the approximation method. The value for the u dimension is uvalue. The value for the v dimension is vvalue. See the Execution section below for a description of the use of these values by each approximation method. 

FORTRAN Input Parameters

All of the following data types are predefined in phigs77.h. 

TYPEThe surface approximation type.  Predefined values are:

0PSAWSDWorkstation Dependent
1PSAEPConstant Parametric Subdivision
2PSAEPKConstant Parametric Subdivision Between Knots
3PSAMWMetric in WC
4PSAMNMetric in NPC
5PSAPDWPlanar Deviation in WC
6PSAPDNPlanar Deviation in NPC

UVAL, VVAL
The values to use when applying the specified approximation method. Valid values depend on the approximation type. UVAL is the value for the u dimension. VVAL is the value for the v dimension. See the Execution section below for a description of the use of these values by each approximation method. 

Execution

Depending upon the edit mode, a SET SURFACE APPROXIMATION CRITERIA 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 SET SURFACE APPROXIMATION CRITERIA element. 

The approximation methods corresponding to the defined approximation types and the use of the approximation values by each method are:

Workstation Dependent, Type 0
Use a workstation dependent approximation method. Currently all SunPHIGS workstation types use method 2 (Constant Parametric Subdivision Between Knots) as the workstation dependent method.  The approximation values have the same usage as for that method. 

Constant Parametric Subdivision, Type 1
Tessellate using equal parametric increments across the entire surface. The integer portions of the approximation values are used and interpreted as follows:

≤ 0: Evaluate the surface only at the parameter limits. 

> 0: Evaluate the surface at the parameter limits and at the specified number of positions between the parameter limits. 

Constant Parametric Subdivision Between Knots, Type 2
Tessellate using equal parametric increments between the knots. The integer portion of the approximation value is used and interpreted as follows:

≤ 0: Evaluate the surface only at the parameter limits and at the knots that fall within the parameter limits. 

> 0: Evaluate the surface at the parameter limits, at the knots that fall within the parameter limits, and at the specified number of positions between the knots, but only if the position is within the parameter limits. 

Metric in WC, Type 3
Tessellate until the maximum length chord measured in World Coordinates (WC) for both the u and v dimensions is less than the corresponding positive real-number approximation value.  Two approximation values are specified, one for each dimension. 

Metric in NPC, Type 4
Tessellate until the maximum length chord measured in Normalized Projection Coordinates (NPC) for both the u and v dimensions is less than the corresponding positive real-number approximation value.  Two approximation values are specified, one for each dimension. 

SunPHIGS Extensions approximates this approximation type by a different adaptive method.  The method used adjusts the tessellation of the surface according to the modelling and viewing transforms in effect when the surface is traversed.  The two approximation values correspond to the maximum length in each of the u and v directions of a tessellated segment, as a percentage of the workstation viewport.  If an approximation value less than, or equal to, 0.0 is specified, the value 0.01 (1 percent) will be used. 

Planar Deviation in WC, Type 5
Tessellate until the absolute value of the deviation measured in WC between the surface and the generated planar sub-primitives is less than the specified positive real-number approximation value.

Planar Deviation in NPC, Type 6
Tessellate until the absolute value of the deviation measured in NPC between the surface and the generated planar sub-primitives is less than the specified positive real-number approximation value.

SunPHIGS Extensions approximates this approximation type by a different adaptive method.  The method used adjusts the tessellation of the surface according to the modelling and viewing transforms in effect when the surface is traversed.  The single approximation value corresponds to the maximum length in each of the u and v directions of a tessellated segment, as a percentage of the workstation viewport.  If an approximation value less than, or equal to, 0.0 is specified, the value 0.01 (1 percent) will be used. 

At traversal time, approximation type zero (Workstation Dependent) and approximation values of one are used if the specified approximation type is not supported by the workstation.  If the approximation values are inconsistent with the specified approximation type, values of one will be used.  The approximation types supported by a workstation type can be determined with the function INQUIRE CURVE AND SURFACE FACILITIES. 

When the current surface approximation criteria ASF is set to INDIVIDUAL, area-defining output primitives which follow in the structure network are filled using the current curve approximation criteria style. 

When the current surface approximation criteria ASF is set to BUNDLED, the surface approximation criteria is taken from the workstation extended representation indicated by the current interior index.  In this case, the surface approximation criteria set with SET SURFACE APPROXIMATION CRITERIA has no effect. 

ERRORS

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

SEE ALSO

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

Sun Release 4.0  —  Last change: 2 August 1989

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