Defines a perspective projection transformation.
FORTRAN (libfgl.a)
void perspective (Angle fovy, Float32 aspect, Coord near, Coord far)
SUBROUTINE PERSPE(fovy, aspect, near, far) INTEGER*4 fovy REAL aspect, near, far
The perspective subroutine defines a perspective projection transformation by specifying a viewing pyramid in the eye coordinate system. The pyramid comprises:
The field of view is the range of the area that is being viewed. The aspect ratio is the ratio of x (width) to y (height), and should match the aspect ratio of the associated viewport. For example, Aspect = 2.0 means the viewer's angle of view is twice as wide in x as it is in y. If the viewport has the same aspect ratio as the frustum, it displays the image without distortion.
The perspective subroutine is very similar to the window subroutine. The only difference between these two is the manner in which the parameters specify the viewing frustum.
After the perspective 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).
When the system is in single matrix mode, the perspective subroutine loads a matrix onto the transformation stack, replacing the current top matrix. When the system is in viewing matrix mode or projection matrix mode, the perspective subroutine replaces the current projection matrix and leaves the matrix stack unchanged.
The example C language program zbuffer1.c uses the perspective subroutine to load a projection transformation as the current transformation matrix.
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 2-D orthographic transformation with the ortho2 subroutine.
Defining a perspective projection transformation in terms of x and y coordinates with the window subroutine.
AIX Graphics Library Overview and Working with Coordinate Systems.