Contents /
Previous /
Next

##
Orthographic Projection

With an orthographic projection, the viewing volume is a rectangular
parallelepiped, or more informally, a box.
Unlike perspective
projection, the size of the viewing volume does not change from one end to the
other, so distance from the camera does not affect how large an object
appears.

This type of projection is used for applications such as creating
architectural blueprints and computer-aided design, where it's crucial to
maintain the actual sizes of objects and angles between them as they're
projected.

The command glOrtho() creates an orthographic parallel viewing volume. As with
glFrustum(), you specify the corners of the near clipping plane and the
distance to the far clipping plane.

void glOrtho( GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top,
GLdouble near, GLdouble far);

It creates a matrix for an orthographic parallel viewing volume and multiplies the
current matrix by it. (left, bottom, -near) and (right, top, -near) are points
on the near clipping plane that are mapped to the lower-left and upper-right
corners of the viewport window, respectively. (left, bottom, -far) and (right,
top, -far) are points on the far clipping plane that are mapped to the same
respective corners of the viewport. Both near and far can be positive or
negative.

The call glOrtho*(l, r, b, t, u, f ) generates R, where:

R is defined as long as l not equal to r, t not equal to b, and n not equal to f.