Node: Projections, Next: , Previous: Pictures, Up: Pictures



Projections

In order for a 3D graphic program to be useful, it must be able to make two-dimensional projections of its three-dimensional constructions so that they can be displayed on computer screens and printed out. These are some of the possible projections:

• Parallel projection onto one of the major planes
These projections are trivial, and can be performed by 3DLDF. They are discussed in the following section.
• Parallel projection onto another plane
I haven't programmed these projections yet, but they might be useful, so I probably will, when I get around to it.
• The perspective projection
This is the projection most people think of, when they think of 3D-graphics. It is discussed in detail in The Perspective Projection.
• The isometric and axonometric projections
These projections are important for engineering and drafting. I have not yet implemented them in 3DLDF, but they are on my list of "Things To Do".

The function Picture::output() takes a const unsigned short argument specifying the projection to be used. The user should probably avoid using explicit unsigned shorts, but should use the constants defined for this purpose in the namespace Projections.1 The constants are PERSP, PARALLEL_X_Y, PARALLEL_X_Z, PARALLEL_Z_Y, AXON, and ISO. The latter two should not be used, because the axonometric and isometric projections have not yet been implemented.


Footnotes

  1. Namespaces are described in Stroustrup, The C++ Programming Language, Chapter 8.