Defines a perspective projection transformation in terms of x and y coordinates.

FORTRAN (**libfgl.a**)

void window(Coordleft, Coordright,Coordbottom, Coordtop,Coordnear, Coordfar)

SUBROUTINE WINDOW(left,right,bottom,top,near,far)REALleft,right,bottom,top,near,far

The **window **subroutine set the current projection transformation to be a perspective transformation. With a perspective transformation, figures do not get smaller as they recede in relation to the viewer.

The **window **subroutine defines a
frustum in eye coordinates. All figures outside this frustum are clipped and not drawn on the screen. All objects contained within this frustum are drawn on the screen in perspective.

The front and back of the frustum are the near and far clipping planes, respectively, located at *near* and *far***.** The sides of the frustum are the projection of a rectangle in the near clipping plane. That is, given a rectangle in the near clipping plane, the sides of the frustum are given by extending from the eye (the origin) through the near clipping plane to the far clipping plane. The sides of the frustum are the left, right, bottom, and top clipping planes. The size of the rectangle on the near clipping plane is given by the parameters *left***, ***right***, ***bottom***,** and *top*.

The **window** subroutine is very similar to the **perspective** subroutine. The only difference between these two is the manner in which the arguments specify the viewing frustum.

After the **window **subroutine completes, the eye coordinate system is set up so that x is to the right, y is up, and z is towards the viewer (out of the screen).

In
single matrix mode, the **window **subroutine loads a matrix onto the matrix stack, replacing the current top matrix. In
viewing matrix mode and projection matrix mode, the system replaces the current projection matrix.

Note:Do not confuse thewindowsubroutine and its functions with the GL windowing subroutines, and the Enhanced X-Windows subroutines, which control the placement and size of rectangular windows on the screen.

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

/usr/include/gl/gl.h |
Contains C language constant and variable type definitions for GL. |

/usr/include/gl/fgl.h |
Contains FORTRAN constant and variable type definitions for GL. |

Defining a 3-D orthographic transformation with the **ortho** subroutine.

Defining a perspective projection transformation in terms of a field of view with the **perspective** subroutine.

Setting the area of the window used for all drawing with the **viewport** subroutine.

AIX Graphics Library Overview and Working with Coordinate Systems.