-->

Sabtu, 03 Maret 2018

3D projection is any method of mapping three-dimensional points to a two-dimensional plane. As most current methods for displaying graphical data are based on planar (pixel information from several bitplanes) two-dimensional media, the use of this type of projection is widespread, especially in computer graphics, engineering and drafting.

Orthographic projection




3D Projection (Parallel Projection ) in Computer Graphics in Hindi - 3D Projection (Parallel Projection ) in Computer Graphics in Hindi.

When the human eye looks at a scene, objects in the distance appear smaller than objects close by. Orthographic projection ignores this effect to allow the creation of to-scale drawings for construction and engineering.

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 plane, cross-section, bird's-eye, and elevation.

If the normal of the viewing plane (the camera direction) is parallel to one of the primary axes (which is the x, y, or z axis), the mathematical transformation is as follows; To project the 3D point a x {\displaystyle a_{x}} , a y {\displaystyle a_{y}} , a z {\displaystyle a_{z}} onto the 2D point b x {\displaystyle b_{x}} , b y {\displaystyle b_{y}} using an orthographic projection parallel to the y axis (where positive y represents forward direction - profile view), the following equations can be used:

b x = s x a x + c x {\displaystyle b_{x}=s_{x}a_{x}+c_{x}}
b y = s z a z + c z {\displaystyle b_{y}=s_{z}a_{z}+c_{z}}

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. Using matrix multiplication, the equations become:

[ b x b y ] = [ s x 0 0 0 0 s z ] [ a x a y a z ] + [ c x c z ] {\displaystyle {\begin{bmatrix}{b_{x}}\\{b_{y}}\\\end{bmatrix}}={\begin{bmatrix}{s_{x}}&0&0\\0&0&{s_{z}}\\\end{bmatrix}}{\begin{bmatrix}{a_{x}}\\{a_{y}}\\{a_{z}}\\\end{bmatrix}}+{\begin{bmatrix}{c_{x}}\\{c_{z}}\\\end{bmatrix}}} .

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 are not foreshortened as they would be in a perspective projection.

Weak perspective projection


Hologram Keyboard 3D Simulator - Android Apps on Google Play
Hologram Keyboard 3D Simulator - Android Apps on Google Play. Source : play.google.com

A "weak" perspective projection uses the same principles of an orthographic projection, but requires the scaling factor to be specified, thus ensuring that closer objects appear bigger in the projection, and vice versa. It can be seen as a hybrid between an orthographic and a perspective projection, and described either as a perspective projection with individual point depths Z i {\displaystyle Z_{i}} replaced by an average constant depth Z a v e {\displaystyle Z_{ave}} , or simply as an orthographic projection plus a scaling.

The weak-perspective model thus approximates perspective projection while using a simpler model, similar to the pure (unscaled) orthographic perspective. It is a reasonable approximation when the depth of the object along the line of sight is small compared to the distance from the camera, and the field of view is small. With these conditions, it can be assumed that all points on a 3D object are at the same distance Z a v e {\displaystyle Z_{ave}} from the camera without significant errors in the projection (compared to the full perspective model).

Equation

P x = X Z a v e P y = Y Z a v e {\displaystyle {\begin{array}{lcl}P_{x}={\frac {X}{Z_{ave}}}\\P_{y}={\frac {Y}{Z_{ave}}}\end{array}}}

assuming focal length f = 1 {\displaystyle {\mathit {f}}=1} .

Perspective projection


3 DIMENSIONAL VIEWING Ceng 477 Introduction to Computer Graphics ...
3 DIMENSIONAL VIEWING Ceng 477 Introduction to Computer Graphics .... Source : slideplayer.com

When the human eye views a scene, objects in the distance appear smaller than objects close by - this is known as perspective. While orthographic projection ignores this effect to allow accurate measurements, perspective projection shows distant objects as smaller to provide additional realism.

The perspective projection requires a more involved definition as compared to orthographic projections. A conceptual aid to understanding the mechanics of this projection is to imagine the 2D projection as though the object(s) are 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:

  • a x , y , z {\displaystyle \mathbf {a} _{x,y,z}} - the 3D position of a point A that is to be projected.
  • c x , y , z {\displaystyle \mathbf {c} _{x,y,z}} - the 3D position of a point C representing the camera.
  • θ x , y , z {\displaystyle \mathbf {\theta } _{x,y,z}} - The orientation of the camera (represented by Taitâ€"Bryan angles).
  • e x , y , z {\displaystyle \mathbf {e} _{x,y,z}} - the viewer's position relative to the display surface which goes through point C representing the camera.

Which results in:

  • b x , y {\displaystyle \mathbf {b} _{x,y}} - the 2D projection of a {\displaystyle \mathbf {a} } .

When c x , y , z = ⟨ 0 , 0 , 0 ⟩ , {\displaystyle \mathbf {c} _{x,y,z}=\langle 0,0,0\rangle ,} and θ x , y , z = ⟨ 0 , 0 , 0 ⟩ , {\displaystyle \mathbf {\theta } _{x,y,z}=\langle 0,0,0\rangle ,} the 3D vector ⟨ 1 , 2 , 0 ⟩ {\displaystyle \langle 1,2,0\rangle } is projected to the 2D vector ⟨ 1 , 2 ⟩ {\displaystyle \langle 1,2\rangle } .

Otherwise, to compute b x , y {\displaystyle \mathbf {b} _{x,y}} we first define a vector d x , y , z {\displaystyle \mathbf {d} _{x,y,z}} as the position of point A with respect to a coordinate system defined by the camera, with origin in C and rotated by θ {\displaystyle \mathbf {\theta } } with respect to the initial coordinate system. This is achieved by subtracting c {\displaystyle \mathbf {c} } from a {\displaystyle \mathbf {a} } and then applying a rotation by âˆ' θ {\displaystyle -\mathbf {\theta } } to the result. This transformation is often called a camera transform, and can be expressed as follows, expressing the rotation in terms of rotations about the x, y, and z axes (these calculations assume that the axes are ordered as a left-handed system of axes):

[ d x d y d z ] = [ 1 0 0 0 cos ⁡ ( θ x ) sin ⁡ ( θ x ) 0 âˆ' sin ⁡ ( θ x ) cos ⁡ ( θ x ) ] [ cos ⁡ ( θ y ) 0 âˆ' sin ⁡ ( θ y ) 0 1 0 sin ⁡ ( θ y ) 0 cos ⁡ ( θ y ) ] [ cos ⁡ ( θ z ) sin ⁡ ( θ z ) 0 âˆ' sin ⁡ ( θ z ) cos ⁡ ( θ z ) 0 0 0 1 ] ( [ a x a y a z ] âˆ' [ c x c y c z ] ) {\displaystyle {\begin{bmatrix}\mathbf {d} _{x}\\\mathbf {d} _{y}\\\mathbf {d} _{z}\\\end{bmatrix}}={\begin{bmatrix}1&0&0\\0&{\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&1\\\end{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)}

This representation corresponds to rotating by three Euler angles (more properly, Taitâ€"Bryan angles), using the xyz convention, which can be interpreted either as "rotate about the extrinsic axes (axes of the scene) in the order z, y, x (reading right-to-left)" or "rotate about the intrinsic axes (axes of the camera) in the order x, y, z (reading left-to-right)". Note that if the camera is not rotated ( θ x , y , z = ⟨ 0 , 0 , 0 ⟩ {\displaystyle \mathbf {\theta } _{x,y,z}=\langle 0,0,0\rangle } ), then the matrices drop out (as identities), and this reduces to simply a shift: d = a âˆ' c . {\displaystyle \mathbf {d} =\mathbf {a} -\mathbf {c} .}

Alternatively, without using matrices (let's replace (ax-cx) with x and so on, and abbreviate cosθ to c and sinθ to s):

d x = c y ( s z y + c z x ) âˆ' s y z d y = s x ( c y z + s y ( s z y + c z x ) ) + c x ( c z y âˆ' s z x ) d z = c x ( c y z + s y ( s z y + c z x ) ) âˆ' s x ( c z y âˆ' s z x ) {\displaystyle {\begin{array}{lcl}\mathbf {d} _{x}=c_{y}(s_{z}\mathbf {y} +c_{z}\mathbf {x} )-s_{y}\mathbf {z} \\\mathbf {d} _{y}=s_{x}(c_{y}\mathbf {z} +s_{y}(s_{z}\mathbf {y} +c_{z}\mathbf {x} ))+c_{x}(c_{z}\mathbf {y} -s_{z}\mathbf {x} )\\\mathbf {d} _{z}=c_{x}(c_{y}\mathbf {z} +s_{y}(s_{z}\mathbf {y} +c_{z}\mathbf {x} ))-s_{x}(c_{z}\mathbf {y} -s_{z}\mathbf {x} )\\\end{array}}}

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):

b x = e z d z d x âˆ' e x b y = e z d z d y âˆ' e y . {\displaystyle {\begin{array}{lcl}\mathbf {b} _{x}&=&{\frac {\mathbf {e} _{z}}{\mathbf {d} _{z}}}\mathbf {d} _{x}-\mathbf {e} _{x}\\\mathbf {b} _{y}&=&{\frac {\mathbf {e} _{z}}{\mathbf {d} _{z}}}\mathbf {d} _{y}-\mathbf {e} _{y}\\\end{array}}.}

Or, in matrix form using homogeneous coordinates, the system

[ f x f y f z f w ] = [ 1 0 âˆ' e x e z 0 0 1 âˆ' e y e z 0 0 0 1 0 0 0 âˆ' 1 e z 1 ] [ d x d y d z 1 ] {\displaystyle {\begin{bmatrix}\mathbf {f} _{x}\\\mathbf {f} _{y}\\\mathbf {f} _{z}\\\mathbf {f} _{w}\\\end{bmatrix}}={\begin{bmatrix}1&0&-{\frac {\mathbf {e} _{x}}{\mathbf {e} _{z}}}&0\\0&1&-{\frac {\mathbf {e} _{y}}{\mathbf {e} _{z}}}&0\\0&0&1&0\\0&0&-{\frac {1}{\mathbf {e} _{z}}}&1\\\end{bmatrix}}{\begin{bmatrix}\mathbf {d} _{x}\\\mathbf {d} _{y}\\\mathbf {d} _{z}\\1\\\end{bmatrix}}}

in conjunction with an argument using similar triangles, leads to division by the homogeneous coordinate, giving

b x = f x / f w b y = f y / f w . {\displaystyle {\begin{array}{lcl}\mathbf {b} _{x}&=&\mathbf {f} _{x}/\mathbf {f} _{w}\\\mathbf {b} _{y}&=&\mathbf {f} _{y}/\mathbf {f} _{w}\\\end{array}}.}

The distance of the viewer from the display surface, e z {\displaystyle \mathbf {e} _{z}} , directly relates to the field of view, where α = 2 â‹… tan âˆ' 1 ⁡ ( 1 / e z ) {\displaystyle \alpha =2\cdot \tan ^{-1}(1/\mathbf {e} _{z})} is the viewed angle. (Note: This assumes that you map the points (-1,-1) and (1,1) to the corners of your viewing surface)

The above equations can also be rewritten as:

b x = ( d x s x ) / ( d z r x ) r z b y = ( d y s y ) / ( d z r y ) r z . {\displaystyle {\begin{array}{lcl}\mathbf {b} _{x}=(\mathbf {d} _{x}\mathbf {s} _{x})/(\mathbf {d} _{z}\mathbf {r} _{x})\mathbf {r} _{z}\\\mathbf {b} _{y}=(\mathbf {d} _{y}\mathbf {s} _{y})/(\mathbf {d} _{z}\mathbf {r} _{y})\mathbf {r} _{z}\\\end{array}}.}

In which s x , y {\displaystyle \mathbf {s} _{x,y}} is the display size, r x , y {\displaystyle \mathbf {r} _{x,y}} is the recording surface size (CCD or film), r z {\displaystyle \mathbf {r} _{z}} is the distance from the recording surface to the entrance pupil (camera center), and d z {\displaystyle \mathbf {d} _{z}} is the distance, from the 3D point being projected, to the entrance pupil.

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

Diagram


Vyomy 3D Hologram Projector - Android Apps on Google Play
Vyomy 3D Hologram Projector - Android Apps on Google Play. Source : play.google.com

To determine which screen x-coordinate corresponds to a point at A x , A z {\displaystyle A_{x},A_{z}} multiply the point coordinates by:

B x = A x B z A z {\displaystyle B_{x}=A_{x}{\frac {B_{z}}{A_{z}}}}

where

B x {\displaystyle B_{x}} is the screen x coordinate
A x {\displaystyle A_{x}} is the model x coordinate
B z {\displaystyle B_{z}} is the focal lengthâ€"the axial distance from the camera center to the image plane
A z {\displaystyle A_{z}} is the subject distance.

Because the camera is in 3D, the same works for the screen y-coordinate, substituting y for x in the above diagram and equation.

See also


3D projection - Wikipedia
3D projection - Wikipedia. Source : en.wikipedia.org

  • Viewing frustum
  • 3D computer graphics
  • Camera matrix
  • Computer graphics
  • Graphics card
  • Homography
  • Homogeneous coordinates
  • Perspective (graphical)
  • Texture mapping
  • Virtual globe
  • Transform and lighting

References


Amazon.com: XGIMI Z4 Aurora Home Entertainment Center 720p 3D ...
Amazon.com: XGIMI Z4 Aurora Home Entertainment Center 720p 3D .... Source : www.amazon.com

Further reading


Home Theater Video Projector Setup - The Basics
Home Theater Video Projector Setup - The Basics. Source : www.lifewire.com

  • Kenneth C. Finney (2004). 3D Game Programming All in One. Thomson Course. p. 93. ISBN 978-1-59200-136-1. 
  • Koehler; Dr. Ralph. 2D/3D Graphics and Splines with Source Code. ISBN 0759611874. 

External links


3D HD 1080P 3000Lumen Home Theater Multimedia PC VGA USB HDMI LED ...
3D HD 1080P 3000Lumen Home Theater Multimedia PC VGA USB HDMI LED .... Source : www.pinterest.com

  • A case study in camera projection
  • Creating 3D Environments from Digital Photographs


 
Sponsored Links