Homogeneous and Cartesian coordinates

handsometan

HandsomeTan

Posted on November 23, 2024

Homogeneous and Cartesian coordinates

In Computer Graphics, Cartesian coordinate is a common coordinate system, but for matrix calculation to be convenient we introduce Homogeneous coordinate system. The reasons are as below:
For a example of two-dimensional, assuming the position of a object is {x, y} and applying a translation operation to this object to obtain a new position: {x + tx, y + ty}, which is a manual calculation method. Matrix multiplication is a method used by computers for coordinate transformation, but whether to use tow-dimensional or three-dimensional, multiplication doesn't work on translation operation. So we bring in additional one dimension, whose value is usually 1, so the coordinate of object in two-dimensional is {x, y, w}. The conversion formula between homogeneous coordinates({x, y, w}) and Rectangular coordinates({X, Y}) is X = x/w, Y = y/w, Now we can use translation operation for martix multiplication:

Image description

in this way, all of transform opertions can be finished through matrix multiplication, thereby diminishing computational costs.
By the way, homogeneous coordinate also address the problem of two parallel lines intersecting. We assume the following situation:

Image description

this equation have no solution in Euclid space because they are parallel mutually. In Perspective space, we use homogeneous coordinate(x/w, y/w) instead of x,y:

Image description

there is a solution: (x, y, 0) represents thet intersection of two parallel lines at this point, which represents the position at infinity.


💖 💪 🙅 🚩
handsometan
HandsomeTan

Posted on November 23, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Homogeneous and Cartesian coordinates
graphics Homogeneous and Cartesian coordinates

November 23, 2024

Math for computer science roadmap
computerscience Math for computer science roadmap

October 30, 2023

Geometry And Primitives In Game Development
programming Geometry And Primitives In Game Development

December 28, 2021

Fundamentals of technical writing
technicalwriting Fundamentals of technical writing

December 13, 2021