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
Homogeneous coordinates
(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!
==Use in computer graphics and computer vision== {{See also|Transformation matrix}} Homogeneous coordinates are ubiquitous in computer graphics because they allow common vector operations such as [[Translation (geometry)|translation]], [[Rotation (mathematics)|rotation]], [[Scaling (geometry)|scaling]] and [[perspective projection]] to be represented as a matrix by which the vector is multiplied. By the chain rule, any sequence of such operations can be multiplied out into a single matrix, allowing simple and efficient processing. By contrast, using Cartesian coordinates, translations and perspective projection cannot be expressed as matrix multiplications, though other operations can. Modern [[OpenGL]] and [[Microsoft Direct3D|Direct3D]] [[graphics card]]s take advantage of homogeneous coordinates to implement a [[vertex shader]] efficiently using [[vector processor]]s with 4-element registers.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/bb206341(VS.85).aspx|title=Viewports and Clipping (Direct3D 9) (Windows)|website=msdn.microsoft.com|access-date=10 April 2018}}</ref><ref>Shreiner, Dave; Woo, Mason; Neider, Jackie; Davis, Tom; "OpenGL Programming Guide", 4th Edition, {{isbn|978-0-321-17348-5}}, published December 2004. Page 38 and Appendix F (pp. 697-702) Discuss how [[OpenGL]] uses homogeneous coordinates in its rendering pipeline. Page 2 indicates that OpenGL is a software interface to [[graphics card|graphics hardware]].</ref> For example, in perspective projection, a position in space is associated with the line from it to a fixed point called the ''center of projection''. The point is then mapped to a plane by finding the point of intersection of that plane and the line. This produces an accurate representation of how a three-dimensional object appears to the eye. In the simplest situation, the center of projection is the origin and points are mapped to the plane {{nowrap|<math>z = 1</math>}}, working for the moment in Cartesian coordinates. For a given point in space, {{nowrap|<math>(x, y, z)</math>}}, the point where the line and the plane intersect is {{nowrap|<math>(x/z, y/z, 1)</math>}}. Dropping the now superfluous <math>z</math> coordinate, this becomes {{nowrap|<math>(x/z, y/z)</math>}}. In homogeneous coordinates, the point {{nowrap|<math>(x, y, z)</math>}} is represented by {{nowrap|<math>(xw, yw, zw, w)</math>}} and the point it maps to on the plane is represented by {{nowrap|<math>(xw, yw, zw)</math>}}, so projection can be represented in matrix form as <math display="block">\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&1&0\end{pmatrix}</math> Matrices representing other geometric transformations can be combined with this and each other by matrix multiplication. As a result, any perspective projection of space can be represented as a single matrix.<ref>{{cite book |title=Mathematics for Computer Graphics Applications| url=https://archive.org/details/mathematicsforco00mort|url-access=limited|first=Michael E.|last=Mortenson |publisher=Industrial Press Inc.|year=1999| isbn=0-8311-3111-X|page=[https://archive.org/details/mathematicsforco00mort/page/n330 318]}}</ref><ref>{{cite book| title=Computer Graphics: Theory into Practice|first=Jeffrey J.|last=McConnell|publisher=Jones & Bartlett Learning|year=2006|isbn=0-7637-2250-2|page=[https://archive.org/details/computergraphics0000mcco/page/120 120]|url=https://archive.org/details/computergraphics0000mcco/page/120}}</ref>
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)