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
Orthographic projection
(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!
== Geometry == [[File:Graphical projection comparison.png|thumb|right|Comparison of several types of [[graphical projection]]]] [[File:Various projections of cube above plane.svg|thumb|Various projections and how they are produced]] [[Image:Axonometric projections.png|thumb|The three views. The percentages show the amount of foreshortening.]] A simple orthographic [[projection (linear algebra)|projection]] onto the [[plane (mathematics)|plane]] ''z'' = 0 can be defined by the following matrix: :<math> P = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \end{bmatrix} </math> For each point ''v'' = (''v''<sub>''x''</sub>, ''v''<sub>''y''</sub>, ''v''<sub>''z''</sub>), the transformed point ''Pv'' would be :<math> Pv = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \end{bmatrix} \begin{bmatrix} v_x \\ v_y \\ v_z \end{bmatrix} = \begin{bmatrix} v_x \\ v_y \\ 0 \end{bmatrix} </math> Often, it is more useful to use [[homogeneous coordinates]]. The transformation above can be represented for homogeneous coordinates as :<math> P = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} </math> For each homogeneous vector ''v'' = (''v''<sub>''x''</sub>, ''v''<sub>''y''</sub>, ''v''<sub>''z''</sub>, 1), the transformed vector ''Pv'' would be :<math> Pv = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} v_x \\ v_y \\ v_z \\ 1 \end{bmatrix} = \begin{bmatrix} v_x \\ v_y \\ 0 \\ 1 \end{bmatrix} </math> In [[computer graphics]], one of the most common matrices used for orthographic [[projection (linear algebra)|projection]] can be defined by a [[n-tuple|6-tuple]], (''left'', ''right'', ''bottom'', ''top'', ''near'', ''far''), which defines the [[clipping (computer graphics)|clipping]] planes. These planes form a box with the minimum corner at (''left'', ''bottom'', -''near'') and the maximum corner at (''right'', ''top'', -''far'').<ref>{{Cite web |last=ThormΓ€hlen |first=Thorsten |date=November 26, 2021 |title=Graphics Programming β Cameras: Parallel Projection β Part 6, Chapter 2 |url=https://www.mathematik.uni-marburg.de/~thormae/lectures/graphics1/graphics_6_2_eng_web.html#10 |access-date=2022-04-22 |website=Mathematik Uni Marburg |pages=8 ff}}</ref> The box is translated so that its center is at the origin, then it is scaled to the unit cube which is defined by having a minimum corner at (β1,β1,β1) and a maximum corner at (1,1,1). The orthographic transform can be given by the following matrix: :<math> P = \begin{bmatrix} \frac{2}{\text{right}-\text{left}} & 0 & 0 & -\frac{\text{right}+\text{left}}{\text{right}-\text{left}} \\ 0 & \frac{2}{\text{top}-\text{bottom}} & 0 & -\frac{\text{top}+\text{bottom}}{\text{top}-\text{bottom}} \\ 0 & 0 & \frac{-2}{\text{far}-\text{near}} & -\frac{\text{far}+\text{near}}{\text{far}-\text{near}} \\ 0 & 0 & 0 & 1 \end{bmatrix} </math> which can be given as a [[scaling (geometry)|scaling]] ''S'' followed by a [[translation (geometry)|translation]] ''T'' of the form :<math> P = ST = \begin{bmatrix} \frac{2}{\text{right}-\text{left}} & 0 & 0 & 0 \\ 0 & \frac{2}{\text{top}-\text{bottom}} & 0 & 0 \\ 0 & 0 & \frac{2}{\text{far}-\text{near}} & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & -\frac{\text{left}+\text{right}}{2} \\ 0 & 1 & 0 & -\frac{\text{top}+\text{bottom}}{2} \\ 0 & 0 & -1 & -\frac{\text{far}+\text{near}}{2} \\ 0 & 0 & 0 & 1 \end{bmatrix} </math> The inversion of the projection matrix ''P<sup>β1</sup>'', which can be used as the unprojection matrix is defined: <math> P^{-1} = \begin{bmatrix} \frac{\text{right}-\text{left}}{2} & 0 & 0 & \frac{\text{left}+\text{right}}{2} \\ 0 & \frac{\text{top}-\text{bottom}}{2} & 0 & \frac{\text{top}+\text{bottom}}{2} \\ 0 & 0 & \frac{\text{far}-\text{near}}{-2} & -\frac{\text{far}+\text{near}}{2} \\ 0 & 0 & 0 & 1 \end{bmatrix} </math>
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)