SET CURVE APPROXIMATION CRITERIA(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET CURVE APPROXIMATION CRITERIA − create a structure element to set the curve approximation criteria
SYNOPSIS
C Syntax
void
pset_curve_approx ( type, value )
Pinttype;approximation type
Pfloatvalue;approximation value
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
SET CURVE APPROXIMATION CRITERIA places into the currently open structure a structure element that specifies the curve approximation type and value. The curve approximation type controls the display precision of non-uniform B-spline curves by specifying the method to use to render the curve.
When the current curve approximation criteria Aspect Source Flag (ASF) is set to INDIVIDUAL, the current value of this attribute defines the curve approximation criteria to be applied to the following output primitive:
• NON-UNIFORM B-SPLINE CURVE
• GENERALIZED DRAWING PRIMITIVE
• GENERALIZED DRAWING PRIMITIVE 3
C Input Parameters
typeThe curve approximation type. Possible values defined in phigs.h are:
1PCURV_WS_DEP
2PCURV_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3PCURV_CHORDAL_SIZE_WC
4PCURV_CHORDAL_SIZE_NPC
5PCURV_CHORDAL_SIZE_DC
6PCURV_CHORDAL_DEVIATION_WC
7PCURV_CHORDAL_DEVIATION_NPC
8PCURV_CHORDAL_DEVIATION_DC
valueThe value to use when applying the specified approximation method. Valid values depend on the approximation method specified. See the Execution section below for a description of the use of value by each approximation method.
Execution
Depending upon the edit mode, a SET CURVE APPROXIMATION CRITERIA element is 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 CURVE APPROXIMATION CRITERIA element.
The approximation methods corresponding to the defined approximation types and the use of the approximation value by each method are:
Implementation Dependent, Type 1
Use an implementation-dependent approximation method. This method is defined by the server.
Constant Parametric Subdivision Between Knots, Type 2
Tessellate using equal parametric increments between each pair of knots on the curve. The integer portion of the approximation value is used and interpreted as follows:
≤ 0: Evaluate the curve only at the parameter limits and at the knots that fall within the parameter limits.
> 0: Evaluate the curve at the parameter limits, at the knots that fall within the parameter limits, and at the specified number of positions between each pair of knots, but only if the position is within the parameter limits.
Chordal Size in WC, Type 3
Tessellate until the length in World Coordinates (WC) of every line segment (chord) representing the curve is less than the specified positive real-number approximation value.
Chordal Size in NPC, Type 4
Tessellate until the length in Normalized Projection Coordinates (NPC) of every line segment (chord) representing the curve is less than the specified positive real-number approximation value.
Chordal Size in DC, Type 5
Tessellate until the length in Device Coordinates (DC) of every line segment (chord) representing the curve is less than the specified positive real-number approximation value.
Chordal Deviation in WC, Type 6
Tessellate until the absolute value of the maximum deviation measured in WC between the curve and approximating line segment (chord) is less than the specified positive real-number approximation value.
Chordal Deviation in NPC, Type 7
Tessellate until the absolute value of the maximum deviation measured in NPC between the curve and approximation line segment (chord) is less than the specified positive real-number approximating value.
Chordal Deviation in DC, Type 8
Tessellate until the absolute value of the maximum deviation measured in DC between the curve and approximation line segment (chord) is less than the specified positive real-number approximating value.
At traversal time, the default approximation type is used if the specified approximation type is not supported by the workstation. If the approximation value is inconsistent with the specified approximation type, a value of 1.0 will be used. The approximation types supported by a workstation type can be determined with the function INQUIRE CURVE AND SURFACE FACILITIES, or by consulting the relevant entries in PHIGS WORKSTATION DESCRIPTION TABLE (7P).
When the current curve approximation criteria ASF is set to INDIVIDUAL, output primitives that follow in the structure network are filled using the current curve approximation criteria style.
When the current curve approximation criteria ASF is set to BUNDLED, the curve approximation criteria is taken from the workstation extended representation indicated by the current polyline index. In this case, the curve approximation criteria set with SET CURVE APPROXIMATION CRITERIA has no effect.
ERRORS
005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)
SEE ALSO
NON-UNIFORM B-SPLINE CURVE (3P+)
INQUIRE CURVE AND SURFACE FACILITIES (3P+)
September 02, 1992