Homogeneous Coordinates (original) (raw)
One of the many purposes of using homogeneous coordinates is to capture the concept of infinity. In the Euclidean coordinate system, infinity is something that does not exist. Mathematicians have discovered that many geometric concepts and computations can be greatly simplified if the concept of infinity is used. This will become very clear when we move to curves and surfaces design. Without the use of homogeneous coordinates system, it would be difficult to design certain classes of very useful curves and surfaces in computer graphics and computer-aided design.
Let us consider two real numbers, a and w, and compute the value of a/w. Let us hold the value of a fixed and vary the value of w. As w getting smaller, the value of a/w is getting larger. If w approaches zero, a/w approaches to infinity! Thus, to capture the concept of infinity, we use two numbers_a_ and w to represent a value v, v=a/w. If w is not zero, the value is exactly a/w. Otherwise, we identify the infinite value with (a,0). Therefore, the concept of infinity can be represented with a number pair like (a, w) or as a quotient a/w.
Let us apply this to the xy_-coordinate plane. If we replace x_and y with x/w and y/w, a function_f(x,y)=0 becomes_f(x/w,y/w)=0. If function_f_(x,y) = 0 is a polynomial, multiplying it with_wn_ will clear all denominators, where n is the degree of the polynomial.
For example, suppose we have a line Ax + By + C = 0. Replacing_x_ and y with x/w and y/w yields_A(x/w) + B(y/w) + C_ = 0. Multiplying by w changes it to
Ax + By + Cw = 0.
Let the given equation be a second degree polynomial_Ax2 + 2Bxy + Cy2 + 2Dx + 2Ey + F_ = 0. After replacing x and y with x/w and y/w and multiplying the result with _w_2, we have
Ax2 + 2Bxy + Cy2 + 2Dxw + 2Eyw + Fw2 = 0
If you look at these two polynomials carefully, you will see that the degrees of all terms are equal. In the case of a line, terms x, _y_and w are of degree one, while in the second degree polynomial, all terms (i.e., _x_2, xy,_y_2, xw, yw and _w_2) are of degree two.
Given a polynomial of degree n, after introducing w, all terms are of degree n. Consequently, these polynomials are called_homogeneous_ polynomials and the coordinates (x,y,w) the homogeneous coordinates.
Given a degree n polynomial in a homogeneous coordinate system, dividing the polynomial with w n and replacing x/w,y/w with x and y, respectively, will convert the polynomial back to a conventional one. For example, if the given degree 3 homogeneous polynomial is the following:
x_3 + 3_xy_2 - 5_y_2_w + 10_w_3 = 0
the result is
_x_3 + 3_xy_2 - 5_y_2 + 10 = 0
This works for three-dimension as well. One can replace a point (x, y, z) with (x/w, y/w, z/w) and multiply the result by w raised to certain power. The resulting polynomial is a homogeneous one. Converting a degree n homogeneous polynomial in x, y, z and w back to the conventional form is exactly identical to the two-variable case.
An Important Notes
Given a point (x,y,w) in homogeneous coordinates, what is its corresponding point in the _xy_-plane? From what we discussed for converting a homogeneous polynomial back to its conventional form, you might easily guess that the answer must be (x/w,y/w). This is correct. Thus, a point (3,4,5) in homogeneous coordinates converts to point (3/5,4/5)=(0.6,0.8) in the _xy_-plane. Similarly, a point (x,y,z,w) in homogeneous coordinates converts to a point (x/w,y/w,z/w) in space.
Conversely, what is the homogeneous coordinates of a point (x,y) in the _xy_-plane? It is simply (x,y,1)! That is, let the w component be 1. In fact, this is only part of the story, because the answer is not unique. The homogeneous coordinates of a point (x,y) in the _xy_-plane is (xw, yw, w) for any non-zero w. Why is this true? Because (xw, yw, w) is converted back to (x,y). As a result, the following is important for you to memorize:
Converting from a homogeneous coordinates to a conventional one isunique; but, converting a conventional coordinates to a homogeneous one is not.
For example, a point (4,2,3) in space is convert to (4_w_, 2_w_, 3_w_, w) for any non-zero w.
The Dimensionality of Homogeneous Coordinates
You perhaps have discovered that homogeneous coordinates need 3 and 4 components to represent a point in the _xy_-plane and a point in space, respectively. Therefore, a point in space (resp., the_xy_-plane) in homogeneous coordinates actually has four(resp., third) components. Adding a fourth (resp., third) component whose value is 1 to the coordinates of a point in space (resp., the _xy_-plane) converts it to its corresponding homogeneous coordinates.
Ideal Points or Points at Infinity
As mentioned at the very beginning of this page, homogeneous coordinates can easily capture the concept of infinity. Let a point (x,y) be fixed and converted to a homogeneous coordinate by multiplying with 1/w, (x/w,y/w,1/w). Let the value of _w_approach to zero, then (x/w,y/w) moves farther and farther away in the direction of (x,y). When w becomes zero, (x/w,y/w) moves to infinity. Therefore, we would say, the homogeneous coordinate (x,y,0) is the _ideal point_or point at infinity in the direction of (x,y).
Let us take a look at an example. Let (3,5) be a point in the xy_-plane. Consider (3/w,5/w). If w is not zero, this point lies on the line y = (5/3) x. Or, if you like the vector form, (3/w,5/w) is a point on the line O + (1/w)d, where the base point O is the coordinate origin and d is the direction vector <3,5>. Therefore, as w approaches zero, the point moves to infinity on the line. This is why we say (x,y,0) is the ideal point or the point at infinity_in the direction of (x,y).
The story is the same for points in space, where (x,y,z,0) is the ideal point or point at infinity in the direction of (x,y,z).
The concept of homogeneous coordinates and points at infinity in certain direction will become very important when we discuss representations of curves and surface.
A Simple Geometric Interpretation
Given a homogeneous coordinate (x,y,w) of a point in the xy_-plane, let us consider (x,y,w) to be a point in space whose coordinate values are x, y and_w for the _x_-, _y_- and w_- axes, respectively. The line joining this point and the coordinate origin intersects the plane_w = 1 at a point (x/w, y/w, 1). Please verify this fact yourself. The following figure illustrates this concept.
This transformation treats a two-dimensional homogeneous point as a point in three-dimensional space and projects (from the coordinate origin) this three-dimensional point to the plane w_=1. Therefore, as a homogeneous point moves on a curve defined by homogeneous polynomial_f(x,y,w)=0, its corresponding point moves in three-dimensional space, which, in turn, is projected to the plane _w_=1. Of course, (x/w,y/w) moves on a curve in plane _w_=1.
The above figure also shows clearly that while the conversion from the conventional Euclidean coordinates to homogeneous coordinates is unique, the opposite direction is not because all points on the line joining the origin and (x,y,w) will be projected to (x/w,y/w,1). This is also an important concept to be used in later lectures.