Jump to content

User:Stestagg/3D

From Wikipedia, the free encyclopedia

A 3D projection is a mathematical transformation used to map three dimensional points onto a two dimensional plane[1]. 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.

(Sorry for vanalizing around, but: This page is wrong!!! You have removed the projection and other matrices that are the most important thing about projections. Rotations and translations have nothing to do with projecting and therefore if you want to remove anything or rewrite it, remove those! I'm undoing it again to previous version. Previous article was better, because if you read it through and had enough mathematical knowledge you actually understood how OpenGL works (because the final projection described there is the one from OpenGL). So, add the projection matrices for al the projections and remove simplified non-matrix bullshit (sorry for language, but I'm angry)!)

Orthographic Projection

[edit]

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, birds-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:

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)

Isometric Projection

[edit]

The Isometric projection is a specific form of Axonometric projection that is particularly suitable for technical diagrams. Each 3D axis is foreshortened by a constant factor () [2], although this factor is often omitted for the sake of simplicity. The isometric transform from to can be expressed:

or with Matrices

Where should be 0.82 (), but can be changed, controlling the scale of the projected image.

It should be noted that traditional pixel art, and older computer games usually use 26.6º() (see Isometric Projection) instead of 30º. This allows lines parallel to the 3D x, or y to be easily drawn without anti-aliasing and does not noticably distort the picture.

Perspective Projection

[edit]

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,0,2> is projected to the 2D vector <1,2>.
  • - 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:

Orthogonal transformation Matrix: [3] Adaptation for n-dimentional arbitrary rotation: [4] Related form, using rotation around intermediate axes: [5]

Or, for those less comfortable with matrix multiplication:

This transformed point can then projected onto the 2D plane using the formula:[6]

Subsequent clipping and scaling operations may be neccessary to map the 2D plane onto any particular display media.

Other Projections

[edit]

Other common 3D projections include:

References

[edit]
  1. ^ Kenneth C. Finney (2004). 3D Game Programming All in One. Thomson Course. p. 93. ISBN 159200136X.
  2. ^ http://www.ul.ie/~rynnet/keanea/isometri.htm
  3. ^ Riley, K F (2006). Mathematical Methods for Physics and Engineering. Cambridge University Press. p. 931. ISBN 0521679710.
  4. ^ Riley, K F (2006). Mathematical Methods for Physics and Engineering. Cambridge University Press. p. 942. ISBN 0521679710.
  5. ^ Goldstein, Herbert (1980). Classical Machanics 2nd Edn. pp. 146–148. ISBN 0201029189.
  6. ^ Sonka, M; Hlavac, V; Boyle, R (1995), Image Processing, Analysis & Machine Vision 2nd Edn., Chapman and Hall, p. 14, ISBN 0412455706