3D projection
From Wikipedia, the free encyclopedia
Views |
---|
Other views |
3D Projection is a method of mapping three dimensional points to a two dimensional plane. As most current methods for displaying graphical data are based on planar two dimensional media, the use of this type of projection is widespread, especially in computer graphics, engineering and drafting.
Contents |
[edit] Orthographic projection
It has been suggested that this article or section be merged with Orthographic projection. (Discuss) |
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, cross-section, bird's-eye, and elevation.
The normal of the viewing plane (the camera direction) is always parallel to one of the 3D axes making the mathematical transformation very simple. To project the 3D point ax, ay, az onto the 2D point bx, by using an Orthographic projection parallel to the y axis(Profile view), the following equation can be used:
- bx = sxax + cx
- by = szaz + cz
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 recorded photographically or perceived by a viewer observing it directly. In particular, 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.
[edit] Perspective projection
It has been suggested that this article or section be merged with Perspective (graphical). (Discuss) |
- See also Transformation matrix
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 behaviour of the projection transformation. The following variables are defined to describe this transformation:
- - the point in 3D space that is to be projected.
- - the location of the camera.
- - The rotation of the camera. When =<0,0,0>, and =<0,0,0>, the 3D vector <1,2,0> is projected to the 2D vector <1,2>.
- - the viewer position in camera space. [1]
Which results in:
- - the 2D projection of .
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: [2] [3]
Or, for those less comfortable with matrix multiplication:
This transformed point can then 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 camera plane to the viewer, , directly relates to the field of view, where is the viewed angle.
Subsequent clipping and scaling operations may be necessary to map the 2D plane onto any particular display media.
[edit] Diagram
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:
[edit] See also
- Computer graphics
- 3D computer graphics
- Graphics card
- Transform and lighting
- Texture mapping
- Perspective (graphical)
- Homography
- Homogeneous coordinates
[edit] References
- ^ Ingrid Carlbom, Joseph Paciorek (Dec. 1978). Planar Geometric Projections and Viewing Transformations v.10 n.4. ACM Computing Surveys (CSUR), p.465-502. DOI:10.1145/356744.356750.
- ^ Riley, K F (2006). Mathematical Methods for Physics and Engineering. Cambridge University Press, 931,942. DOI:10.2277/0521679710. ISBN 0521679710.
- ^ Goldstein, Herbert (1980). Classical Machanics 2nd Edn., 146-148. ISBN 0201029189.
- ^ Sonka, M; Hlavac, V & Boyle, R (1995), Image Processing, Analysis & Machine Vision 2nd Edn., Chapman and Hall, pp. 14, ISBN 0412455706
[edit] Further Reading
- Kenneth C. Finney (2004). 3D Game Programming All in One. Thomson Course, 93. ISBN 159200136X.