This transformation is specified by mapping a Window in the application's WC space to a Viewport in NDC space. Both the WC window and the NDC viewport are rectangles parallel to the x,y axes. They are specified by calls to Set WiNdow and Set ViewPort:
CALL GSWN (TNR, WXMIN, WXMAX, WYMIN, WYMAX) CALL GSVP (TNR, VXMIN, VXMAX, VYMIN, VYMAX)
Because there may be several Normalization Transformations, the integer value TNR indicates to which one the call applies. The other values are real numbers defining the bottom left and top right corners of the two rectangles. The window is specified in the WC system, and the viewport in the NDC system. If the x and y sides of the window and the viewport do not have the same Aspect Ratio a distortion effect will take place. This may or may not be intentional!
As has been mentioned, it is possible to generate a complex picture with different world coordinates for different parts of the image, or to place several pictures on different areas of the screen. This is achieved by specifying multiple normalization transformations. Each transformation is assigned a transformation number (TNR) for which the range is 0 to some implementation-dependent maximum (usually about 20). Thus, the transformation corresponding to each number specifies a separate window-to-viewport mapping. If the viewports overlap then their contents will be superimposed.
The default transformation number is 0, for which the WC and NDC coordinate systems are the same. Transformation 0 may not be modified, and so its use is always equivalent to calling:
CALL GSWN (TNR, 0.0, 1.0, 0.0, 1.0) CALL GSVP (TNR, 0.0, 1.0, 0.0, 1.0)
The application specifies which normalization transformation is active at a given time by a call to GSELNT (SELect Normalization Transformation):
CALL GSELNT(TNR)All primitives created subsequently will be transformed according to this transformation until a different one is selected.
Figure: Windows and Viewports