Part of a series on: 
Graphical projection 


Other

3D projection is any method of mapping threedimensional points to a twodimensional plane. As most current methods for displaying graphical data are based on planar twodimensional media, the use of this type of projection is widespread, especially in computer graphics, engineering and drafting.
Contents 
Orthographic projections are a small set of transforms often used to show profile, detail or precise measurements of a three dimensional object. Common names for orthographic projections include plan, crosssection, bird'seye, and elevation.
If the normal of the viewing plane (the camera direction) is parallel to one of the 3D axes, the mathematical transformation is as follows; To project the 3D point a_{x}, a_{y}, a_{z} onto the 2D point b_{x}, b_{y} using an orthographic projection parallel to the y axis (profile view), the following equations can be used:
where the vector s is an arbitrary scale factor, and c is an arbitrary offset. These constants are optional, and can be used to properly align the viewport. The projection can be shown using Matrix notation (introducing a temporary vector d for clarity)
While orthographically projected images represent the three dimensional nature of the object projected, they do not represent the object as it would be recorded photographically or perceived by a viewer observing it directly. In particular, parallel lengths at all points in an orthographically projected image are of the same scale regardless of whether they are far away or near to the virtual viewer. As a result, lengths near to the viewer appear foreshortened.
The perspective projection requires greater definition. A conceptual aid to understanding the mechanics of this projection involves treating the 2D projection as being viewed through a camera viewfinder. The camera's position, orientation, and field of view control the behavior of the projection transformation. The following variables are defined to describe this transformation:
Which results in:
First, we define a point as a translation of point into a coordinate system defined by . This is achieved by subtracting from and then applying a vector rotation matrix using to the result. This transformation is often called a camera transform (note that these calculations assume a lefthanded system of axes): ^{[2]} ^{[3]}
Or, for those less comfortable with matrix multiplication. Signs of angles are inconsistent with matrix form:
This transformed point can then be projected onto the 2D plane using the formula (here, x/y is used as the projection plane, literature also may use x/z):^{[4]}
Or, in matrix form using homogeneous coordinates:
and
The distance of the viewer from the display surface, , directly relates to the field of view, where is the viewed angle. (Note: This assumes that you map the points (1,1) and (1,1) to the corners of your viewing surface)
Subsequent clipping and scaling operations may be necessary to map the 2D plane onto any particular display media.
To determine which screen x coordinate corresponds to a point at Ax,Az multiply the point coordinates by:
the same works for the screen y coordinate:
(where Ax and Ay are coordinates occupied by the object before the perspective transform)
