HandsomeTan
Posted on November 23, 2024
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:
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:
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:
there is a solution: (x, y, 0) represents thet intersection of two parallel lines at this point, which represents the position at infinity.
Posted on November 23, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.