User:KYN/Homogeneous representations in 2D
From Wikipedia, the free encyclopedia
In a 2-dimensional space, e.g. R2, geometrical objects such as points and lines can be given a representation in terms of homogeneous coordinates. Also transformations on these objects can be given a homogeneous representation. The reason for introducing a homogeneous representation for these objects and transformations is that
- A relative large class of transformations can be represented by linear transformation on the homogeneous coordinates, even though the corresponding transformation on the 2D coordinates of, e.g., a point or a line, is not linear. Examples is this are presented below.
- Various geometrical relations, e.g., incidence between a point and a line, can be represented in a simple way. Examples is this are presented below.
Usually, a homogeneous representation is defined for points and all other homogeneous representation, e.g., of lines and various transformations, follows from that. The homogeneous representation for points is usually defined by introducing an addition dimension where the corresponding coordinate assumes a constant value. In presentations of this topic the extra dimension is placed either as the first or as the last dimension in the homogeneous representation. Also, the specific value of the constant coordinate in this dimension can, in principle, assume any non-zero value. Most presentations assign a unit value to this coordinate, but it should be noted that for practical or numerical reasons, it may be desirable to choose another value for this dimension.
In this presentation, the extra dimension is placed first and it is given a unit value. It should be noted that any other homogeneous representation of 2D points can be obtained by a suitable linear transformation of the homogeneous coordinates.
Contents |
[edit] Homogeneous representation of 2D points
A 2D point
is represented by the 3D vector , its homogeneous coordinates, according to
To fully enjoy all the benefits of a homogeneous representation, it is sometimes necessary to see as an element of a projective space, i.e., any non-zero scaling of
is considered as an equivalent representation of the 2D point x. This can be described as
for
. A consequence of this projective property is that x can be obtained from
only after a proper normalization:
where
Notice that this transformation from to x requires that
. Any such homogeneous coordinate represents a proper 2D point.
[edit] Points at infinity
A special feature of the homogeneous representation of 2D points is that it allows points which are at infinite distance from the origin to be represented in a consistent way. Points at infinity have a homogeneous representation as
The transformation from this homogeneous coordinate to a 2D point according to the expression above yields an indefinite vector since we cannot divide by zero. On the other hand, the previous vector can also be seen as the limit value of
when . This can be interpreted in a consistent way as a point which lies at infinite distance from the origin and in the direction defined by the vector
The term "direction" is somewhat misleading. Since is a projective element
which means that we can find a point at infinity by going in two opposite directions and that the two resulting points in this representation have to be thought of as the same point. Even though this may appear strange from an intuitive point of view, this interpretation of points at infinity is consistent with the geometrical statements which sometimes produce such homogeneous representations. Examples of this are presented below.
[edit] The zero vector
The above transformations from homogeneous coordinates back to either a "proper" 2D point or a point at infinity applies to all 3D vectors except the zero vector. What does the zero vector represent as a homogeneous coordinate? The answer is simple: nothing. There is no useful interpretation of the zero vector as a homogeneous representation. This implies that all operations which are applied to the homogeneous coordinates have to be carefully designed in order not to produce the zero vector as a result. Another way to describe it is to say that if an operation produces homogeneous coordinates and the result may be zero, this specific case should be interpreted as the operation fails to produce a meaningful result. Examples of this are presented below.
The same discussion applies to any zero vector, matrix or tensor which may appear as homogeneous representations of various types of geometrical objects.
[edit] Homogeneous representation of 2D lines
Any 2D line can be described as the set of points
which satisfies the condition
- x1l1 + x2l2 = l
where and
. This type of parameterization of a line is chosen since it allows any slope of the line to be described. In fact, l1 and l2 represent the cosine and sine of the slope angle and l is the shortest distance from the line to the origin.
The above equation which characterizes a line can be rewritten as
From this expression, it can be seen that if we use the 3D vector
as a homogeneous representation of the line, then it follows that
-
- the point x lies on the line l is equivalent with
- the point x lies on the line l is equivalent with
Furthermore, also can be characterized a projective element since a non-zero scaling of
does not change the above statement about x and l. In this case, the vector
includes a scale factor which needs to be taken care of in order to recover the parameters of the line. From the relation
if follows that
Notice that this transformation from to the parametes of the line requires that
. Any such homogeneous coordinate represents a proper 2D line.
[edit] The line at infinity
In the same way as there are points at inifnity there is also a line at infinity. However, there are infinitly many points are infinity but only one line. The line at infinity is the result of considering the limit case of in the transformation rule from
to the line parameters. The resulting line will have a distance to the origin which goes to infinity and have a homogeneous representation according to
Any homogeneous representation of a proper line has this vector as its limit value which means that there is only one line at infinity. It must also be the case that the line at infinity passes through all points at infinity and no other points.
[edit] Representation of 2D points and lines in terms of Plücker coordinates
The vector form defined above for the homogeneous representations of either points or lines has a counter part in representations based on anti-symmetric matrices, referred to as Plücker coordinates. It is straigtfoward to go between these two representations, and using Plücker coordinates it is easy to find the line which intersects two points and, vice versa, the point given by the intersection of two lines.
[edit] From points to lines
Let two distinct points have homogeneous coordinates given by the vectors . Form the anti-symmetric matrix
as
Let the elements of the two vectors be given by
which gives the elements in matrix according to
Notice that the anti-symmetric matrix
is "three-dimensional" in the sense that it contains only 3 linearly independent elements. We can construct a vector
as
Let us now interpret as the dual homogeneous representation of a 2D line, as described above. Which line is it? To see this, we can investigate its relation to the two points represented by
:
This implies that the line which represents intersects both points. Consequently, we have found a computational approach for determining the dual homogeneous representation of the line which intersects two specific points. In this approach two different representations of the line are used; the dual homogeneous coordinates given by the vector
and the so-called Plücker coordinates given by the anti-symmetric
matrix
. The mapping from
to
described above is one-to-one so we can easily go from one representation to the other and back again as we choose.
It was said above that represent two distinct points. If the points coincide, then
. This is an indication that there is no unique line which intersects both points if they coincide.
From this discussion it follows immediately that if the two points are at infinity, with X01 = X02 = 0, then the line is also at infinity.