Homogeneous Coordinate System of Essential Mathematical Foundations for Getting Started with Unity Shader

Homogeneous coordinate system


Homogeneous coordinate system is one of the most basic knowledge of graphics. Homogeneous coordinates can help Euclidean coordinate systems deal with perspective problems. In Euclidean coordinate systems, we tend not to be able to deal with perspective issues (intersections at a distance).

Why is there a homogeneous coordinate system?

In our normal thinking, if two line segments in two-dimensional coordinates are the same (in the same direction and not coincident), then the two line segments will definitely not have a focus:

{Ax+By+C=0Ax+By+D=0

Then if two straight lines of this type of surface intersect, then C/D must not be equal, but the equation does not hold, but if they are equal, the equation is the same.
So here is the introduction of the homogeneous coordinate system:

Axw+Bandw+C=0Axw+Bandw+D=0

Here w is introduced:
{Ax+By+Cw=0Ax+By+Dw=0

Then if w=0, the equation holds, and the two lines have an intersection:
(x, y, w).
Here is the geometric meaning of homogeneous coordinate system.

So in the specific Euclidean space, what is the representation of the homogeneous coordinate system?

In two-dimensional Euclidean space, coordinate points are expressed as:

( x , y)

We add one dimension to this coordinate, extending it into homogeneous coordinates:
( x , y,w)

Then we only need to set w=0 when we express infinity.

The original meaning of homogeneous coordinate system should be to have the same "property".
Because we will find when processing points:

( x , y,1)and( k x , k y,k)

is the same point.
Reference:
http://www.songho.ca/math/homogeneous/homogeneous.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326699570&siteId=291194637