Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Transformation matrix
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Perspective projection=== {{main|Perspective projection}} {{further|Pinhole camera model}} [[File:Perspective transformation matrix 2D.svg|thumb|Comparison of the effects of applying 2D affine and perspective transformation matrices on a unit square.]] Another type of transformation, of importance in [[3D computer graphics]], is the [[perspective projection]]. Whereas parallel projections are used to project points onto the image plane along parallel lines, the perspective projection projects points onto the image plane along lines that emanate from a single point, called the center of projection. This means that an object has a smaller projection when it is far away from the center of projection and a larger projection when it is closer (see also [[Multiplicative inverse|reciprocal function]]). The simplest perspective projection uses the origin as the center of projection, and the plane at <math>z = 1</math> as the image plane. The functional form of this transformation is then <math>x' = x / z</math>; <math>y' = y / z</math>. We can express this in [[homogeneous coordinates]] as: <math display="block">\begin{bmatrix} x_c \\ y_c \\ z_c \\ w_c \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix}=\begin{bmatrix} x \\ y \\ z \\ z \end{bmatrix} </math> After carrying out the [[matrix multiplication]], the homogeneous component <math>w_c</math> will be equal to the value of <math>z</math> and the other three will not change. Therefore, to map back into the real plane we must perform the '''homogeneous divide''' or '''perspective divide''' by dividing each component by <math>w_c</math>: <math display="block">\begin{bmatrix} x' \\ y' \\ z' \\ 1 \end{bmatrix} = \frac{1}{w_c} \begin{bmatrix} x_c \\ y_c \\ z_c \\ w_c \end{bmatrix}=\begin{bmatrix} x / z \\ y / z \\ 1 \\ 1 \end{bmatrix}</math> More complicated perspective projections can be composed by combining this one with rotations, scales, translations, and shears to move the image plane and center of projection wherever they are desired.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)