Game Development Reference
In-Depth Information
To understand how the standard physical 3D space is extended into
4D, let's first examine homogeneous coordinates in 2D, which are of the
form (x,y,w). Imagine the standard 2D plane as existing in 3D at the
plane w = 1, such that physical 2D point (x,y) is represented in homo-
geneous space (x,y,1). For all points that are not in the plane w = 1,
we can compute the corresponding 2D point by projecting the point onto
the plane w = 1, by dividing by w. So the homogeneous coordinate
(x,y,w) is mapped to the physical 2D point (x/w,y/w). This is shown in
Figure 6.2.
Figure 6.2
Projecting
homogeneous
coordinates onto the
plane w = 1 in 2D
For any given physical 2D point (x,y) there are an infinite number
of corresponding points in homogeneous space, all of the form (kx,ky,k),
provided that k = 0. These points form a line through the (homogeneous)
origin.
When w = 0, the division is undefined and there is no corresponding
physical point in 2D space. However, we can interpret a 2D homogeneous
point of the form (x,y,0) as a “point at infinity,” which defines a direction
rather than a location. When we make the conceptual distinction between
“points” and “vectors” (see Section 2.4), then the “locations” where w = 0
are “points“ and the “directions” with w = 0 are are “vectors.” There is
more on this in the next section.
The same basic idea applies when extending physical 3D space to 4D
homogeneous space (although it's a lot harder to visualize). The physical
3D points can be thought of as living in the hyperplane in 4D at w = 1.
A 4D point is of the form (x,y,z,w), and we project a 4D point onto this
hyperplane to yield the corresponding physical 3D point (x/w,y/w,z/w).
When w = 0, the 4D point represents a “point at infinity,” which defines a
direction rather than a location.
Search WWH ::




Custom Search