3D projection
Wikipedia, the free encyclopedia - Cite This SourceA 3D projection is a mathematical transformation used to project three dimensional points onto a two dimensional plane. As most current methods for displaying graphical data are based on two dimensional media, the use of 3D projection is widespread, especially in computer graphics, engineering and drafting. Several common projections are described below.
Orthographic projection
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 , , onto the 2D point , using an Orthographic projection parallel to the y axis(Profile view), the following equation can be used:
1 & 0 & 0
0 & 0 & 1end{bmatrix}begin{bmatrix} {a_x } {a_y } {a_z } end{bmatrix}
Perspective projection
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:- - a point in 3D space.
- - 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.
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:
1 & 0 & 00 & {cos -mathbf{theta}_x } & {sin -mathbf{theta}_x } 0 & { - sin -mathbf{theta}_x } & {cos -mathbf{theta}_x } end{bmatrix}begin{bmatrix} {cos -mathbf{theta}_y } & 0 & { - sin -mathbf{theta}_y }
0 & 1 & 0{sin -mathbf{theta}_y } & 0 & {cos -mathbf{theta}_y } end{bmatrix}begin{bmatrix} {cos -mathbf{theta}_z } & {sin -mathbf{theta}_z } & 0 { - sin -mathbf{theta}_z } & {cos -mathbf{theta}_z } & 0
0 & 0 & 1end{bmatrix}left({begin{bmatrix} mathbf{a}_x mathbf{a}_y mathbf{a}_z end{bmatrix} - begin{bmatrix} mathbf{c}_x mathbf{c}_y mathbf{c}_z end{bmatrix}} right)
Or, for those less comfortable with matrix multiplication:
Or again in matrix form:
0 & 0 & 1 & 00 & 0 & 1/mathbf{e}_z & 0 end{bmatrix}begin{bmatrix} mathbf{d}_x mathbf{d}_y mathbf{d}_z
1end{bmatrix} 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.
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:
Other projections
Other common 3D projections include:- Isometric projection - othographic projection which is used in illustrations and computer games
- Fisheye projection - most commonly used in wide-angle photography to create special effects
- Map projections - Cartographers use numerous projections to represent the earth
- Stereoscopic projections - utilise color information or light polarity to encode depth information
- Dimetric and Trimetric projections - relations of the isometric projection
See also
- Computer graphics
- 3D computer graphics
- Graphics card
- Transform and lighting
- Texture mapping
- Perspective (graphical)
- Homography
- Homogeneous coordinates
References
Wikipedia, the free encyclopedia © 2001-2006 Wikipedia contributors (Disclaimer)
This article is licensed under the GNU Free Documentation License.
Last updated on Thursday March 13, 2008 at 09:39:53 PDT (GMT -0700)
View this article at Wikipedia.org - Edit this article at Wikipedia.org - Donate to the Wikimedia Foundation