Coordinate Transformation Operators

This clause defines the operators that manipulate Transformations, and which affect the CurrentTransformation Graphics State Variable. The type Transformation and the coefficients associated with Transformations are defined in .

The definition of the Transformation operators requires the following definitions. If T1 and T2 are two Transformations, the mapping which consists of applying the mapping represented by T1 to the result of the mapping represented by T2 is also of the form specified in . The Transformation which represents this mapping is referred to as the concatenation of T1 with T2 (denoted T1 × T2). If T1 and T2 are two Transformations whose associated matrices are respectively

M1= a1 c1 e1 b1 d1 f1 001

M2= a2 c2 e2 b2 d2 f2 001

then T1 × T2 is the Transformation whose associated matrix is the (usual matrix) product M1× M2, which is defined by

M1 × M2= (a1× a2+ b1× c2) (c1× a2+ d1× c2) (e1× a2+f1× c2+ e2) (a1× b2+ b1× d2) (c1× b2+ d1× d2) (e1× b2+f1× d2+ f2) 001

The specification of these operators and their semantics includes the specification of conditions which may cause content exceptions to be raised as a result of interpretation of the operators. Content exceptions and exception handling are defined in . In addition to these operator-specific exceptions, there are generic exceptions which may be raised during the interpretation of almost any operator. These generic exceptions and their semantics are described in .

ScaleT

The ScaleT operator takes two operands

  • <s2: Number>
  • <s1: Number> and returns a single result
  • <T: Transformation> where T is the Transformation whose matrix is:

    s1 00 0s10 001

    When applied, the effect of this Transformation is to scale the User Coordinate System by a factor of s1 in the x-axis and s2 in the y-axis.

    Scale

    The Scale operator takes two operands

  • <s2: Number>
  • <s1: Number> and returns no results. The effect of the Scale operator is the same as
  • {s1 s2 ScaleT Concat}

    TranslateT

    The TranslateT operator takes two operands

  • <y: Number>
  • <x: Number> and returns a single result
  • <T: Transformation> where T is the Transformation whose matrix is: 10x 01y 001

    When applied, the effect of this Transformation is to translate the coordinate system so that the origin is the point whose coordinates are (x,y) in the current User Coordinate System.

    Translate

    The Translate operator takes two operands

  • <y: Number>
  • <x: Number> and returns no results. The effect of the Translate operator is the same as
  • {x y TranslateT Concat}

    RotateT

    The RotateT operator takes one operand

  • <a: Number> where a is in degrees and returns a single result
  • <T: Transformation> where T is the Transformation whose matrix is: cos a-sin a0 sin a cos a 0 0 01

    When applied, the effect of this Transformation is to rotate the User Coordinate System a degrees in a counter-clockwise direction about the current origin.

    Rotate

    The Rotate operator takes one operand

  • <a: Number> where a is in degrees and returns no results. The effect of the Rotate operator is the same as
  • {a RotateT Concat}

    ConcatT

    The ConcatT operator takes two operands

  • <T2: Transformation>
  • <T1: Transformation> and returns a single result
  • <T3: Transformation> where T3 = T1 × T2.

    Concat

    The Concat operator takes a single operand

  • <T: Transformation> and returns no results. If T0 is the Transformation (see ) that represents the CurrentTransformation at the time at which Concat is executed, then Concat changes its value to T ×T0.

    SetTrans

    The SetTrans operator takes a single operand

  • <T: Transformation> and returns no results. The effect is to set the CurrentTransformation Graphics State Variable to T ×Ti where Ti is the Initial CurrentTransformation component of the Virtual Machine (see ).

    GetTrans

    The GetTrans operator takes no operands and returns a single result

  • <T: Transformation> where T is the Transformation for which {T SetTrans} would set the CurrentTransformation Graphics State Variable to its current value.