The transformation subroutines found in this section fall into three general categories: modeling clipping, modeling transformations and workstation transformations.

**Modeling Clipping**

The four modeling clipping subroutines are:

**GPMCI**- Set Modeling Clipping Indicator
**GPMCV2**- Set Modeling Clipping Volume 2
**GPMCV3**- Set Modeling Clipping Volume 3
**GPRMCV**- Restore Modeling Clipping Volume

The modeling clipping subroutines create modeling clipping structure elements, which modify the current modeling clipping values that the graPHIGS API applies to primitives during traversal.

**Modeling Transformations**

The four modeling transformation subroutines are:

**GPGLX2**- Set Global Tranformation 2
**GPGLX3**- Set Global Transformation 3
**GPMLX2**- Set Modeling Transformation 2
**GPMLX3**- Set Modeling Transformation 3

The modeling transformation subroutines create transformation structure elements, which modify the current transformation values that the graPHIGS API applies to primitives during traversal.

**Workstation Transformations**

The three workstation transformation subroutines are:

**GPDCMM**- Set Device Coordinate Mapping Method
**GPWSX2**- Set Workstation Transformation 2
**GPWSX3**- Set Workstation Transformation 3

**Note: **

When the graPHIGS API inserts a structure element into an open structure following the element pointer, the pointer moves to the new element.

GPBDMF
(flength,fdata) |

**Purpose**

Use
**GPBDMF**
to insert a Set Back Data Morphing Factors structure element
into the open structure following the element pointer, or to replace
the element pointed at by the element pointer with a Set Back
Data Morphing Factors structure element,
depending on the current edit mode.

During traversal, the graPHIGS API combines
the values of *fdata*
with a primitive's data morphing vectors to modify
its rendered data mapping data.
If the face distinguish mode
(**GPFDMO**)
is `1=NONE`
,
then the graPHIGS API uses
the current data morphing scale factors when performing data
mapping on the back facing portions of area primitives.
If the face distinguish mode is
`2=COLOR_SURFACE_PROPERTIES`
,
then the graPHIGS API uses these values when performing
data mapping on only back facing portions of area
primitives.

In data morphing, the graPHIGS API combines the
data mapping data values
(x_{1}
, x_{2}
, ..., x_{ndata}
)
with the back data morphing scale factors
in the *fdata* parameter
(s_{1}
, s_{2}
, ..., s_{nscale}
)
and the data morphing vectors
((d_{1,1}
, d_{1,2}
, ..., d_{1,ndata}
),
(d_{2,1}
, d_{2,2}
, ..., d_{2,ndata}
), ...,
(d_{nvector,1}
, d_{nvector,2}
, ...,
d_{nvector,ndata}
))
to obtain the new back data mapping data values
(x'_{1}
, x'_{2}
, ..., x'_{ndata}
).
This combination is of the form:

x'_{1}
= s_{1}
x_{1}
+
s_{2}
d_{1,1}
+
s_{3}
d_{2,1}
+...+
s_{nscale}
d_{nvector,1}

x'_{2}
= s_{1}
x_{2}
+
s_{2}
d_{1,2}
+
s_{3}
d_{2,2}
+...+
s_{nscale}
_{nvector,2}

...

x'_{ndata}
= s_{1}
x_{ndata}
+
s_{2}
d_{1, ndata}
+
s_{3}
d_{2}
,ndata> +...+
s_{nscale}
d_{nvector,ndata}

These equations show that the number of morphing scale
factors should be one more than the number of morphing vectors in the
affected primitive (*nscale*=*nvector*+1).
However,
if the number of morphing vectors and scale factors
disagree at traversal time,
then 0 value vectors and scale factors are assumed
wherever necessary.
For example, if you supply
too many scale factors for a given primitive
(*nscale*>*nvector*+1),
then the graPHIGS API ignores
the extra scale factors, as if there were additional
0 valued morphing vectors in the primitive definition.
If you supply too few scale factors
(*nscale*<*nvector*+1),
then the graPHIGS API ignores
the extra morphing vectors, just as if there were additional
scale factors with value zero in this function call.

The traversal default for data morphing is
*flength*=1 and
*fdata*={1.0}

Use
**GPQWDT**
to inquire the morphing facilities of a specified workstation.

**Parameters**

**Error Codes**

**5**- FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
**61**- LENGTH IS INVALID

**Related Subroutines**

**GPDMF**- Set Data Morphing Factors
**GPDMR**- Set Data Mapping Representation
**GPQWDT**- Inquire Workstation Description
**GPVMF**- Set Vertex Morphing Factors

**RCP code**

201343521 (X'0C004221')