Projection

When three-dimensional graphics are displayed on a flat computer screen or printed on paper, they must be projected onto the viewing plane. A projection is a way of converting positions in 3D space into locations in the 2D viewing plane. IDL supports two types of projections—parallel and perspective—for each view.

Parallel Projections

A parallel projection projects objects in 3D space onto the 2D viewing plane along parallel rays. The figure below shows a parallel projection; note that two objects that are the same size but at different locations still appear to be the same size when projected onto the viewplane.

Figure 3-2: In a Parallel Projection, Rays Do Not Converge at the Eye

objtran2.gif

View objects use a parallel projection by default. To explicitly set a view object to use a parallel projection, set the PROJECTION keyword to the IDLgrView::Init method equal to 1 (or use the SetProperty method to set the projection for an exiting view object):

myView->SetProperty, PROJECTION = 1 

Perspective Projections

A perspective projection projects objects in 3D space onto the 2D viewing plane along rays that converge at the eye position. The figure below shows a perspective projection; note that objects that are farther from the eye appear smaller when projected onto the viewplane.

Figure 3-3: In a Perspective Projection, Rays Converge at the Eye

objtran3.gif

Set the PROJECTION keyword to the IDLgrView::Init method equal to 2 (or use the SetProperty method to set the projection for an exiting view object) to use a perspective projection:

myView->SetProperty, PROJECTION = 2