3-D Visualization Previous page   Next Page

View Projection Types

MATLAB supports both orthographic and perspective projection types for displaying 3-D graphics. The one you select depends on the type of graphics you are displaying:

By default, MATLAB displays objects using orthographic projection. You can set the projection type using the camproj command.

These pictures show a drawing of a dump truck (created with patch) and a surface plot of a mathematical function, both using orthographic projection.

If you measure the width of the front and rear faces of the box enclosing the dump truck, you'll see they are the same size. This picture looks unnatural because it lacks the apparent perspective you see when looking at real objects with depth. On the other hand, the surface plot accurately indicates the values of the function within rectangular space.

Now look at the same graphics objects with perspective added. The dump truck looks more natural because portions of the truck that are farther from the viewer appear smaller. This projection mimics the way human vision works. The surface plot, on the other hand, looks distorted.


Previous page  Rotation About the Viewing Axis Projection Types and Camera Location Next page

© 1994-2005 The MathWorks, Inc.