perspective(3G) — Silicon Graphics
NAME
perspective − defines a perspective projection transformation
SPECIFICATION
C
perspective(fovy, aspect, near, far)
Angle fovy;
float aspect;
Coord near, far;
FORTRAN
subroutine perspe(fovy, aspect, near, far)
integer*4 fovy
real aspect, near, far
Pascal
procedure perspective(foyv: longint; aspect:
real; near, far: Coord);
DESCRIPTION
perspective defines a projection transformation by indicating the field-of-view angle (fovy) in the y direction of the eye coordinate system; the aspect ratio that determines the field of view in the x direction; and the distance to the near and far clipping planes in the z direction. The aspect ratio is a ratio of x to y. In general, the aspect ratio in perspective 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 is twice as wide as it is tall, it displays the image without distortion. near and far are the distances from the viewer to the near and far clipping planes, and are always positive.
perspective loads a matrix onto the transformation stack, overwriting what was there.
fovy is in tenths of degrees, as are all angles. fovy must be ≥ 2 or an error results.
SEE ALSO
ortho, window Programming Guide, Section 4.3, Projection Transformations
Version 3.6 — December 20, 1987