Projective geometry studies geometric properties that are invariant under projective transformations. It extends Euclidean geometry by adding “points at infinity.”
Homogeneous Coordinates
In -dimensional projective space , a point is represented by coordinates , where not all are zero. Two sets of coordinates represent the same point if they are scalar multiples of each other:
For the projective line , the point represents the point at infinity.
Interactive Lab
def to_homogeneous(x, y):
return [x, y, 1]
def from_homogeneous(coords):
x, y, w = coords
if w == 0:
return "Point at infinity"
return [x/w, y/w]
# A standard point
p1 = to_homogeneous(5, 10)
print(f"Homogeneous: {p1} -> Euclidean: {from_homogeneous(p1)}")
# A scaled homogeneous point
p2 = [10, 20, 2] # Same as [5, 10, 1]
print(f"Scaled Homogeneous: {p2} -> Euclidean: {from_homogeneous(p2)}")
One of the most profound features of projective geometry is the principle of duality: for any theorem in two-dimensional projective geometry, there is a dual theorem obtained by interchanging the roles of “points” and “lines.”
Knowledge Check
In P2, what is the intersection of any two distinct lines?
Answer: Exactly one point (possibly at infinity).
In P2, what is the intersection of any two distinct lines?
Cross-Ratio
The cross-ratio is the fundamental invariant of projective geometry. For four collinear points , the cross-ratio is defined as:
where denotes the signed distance from to .
Interactive Lab
def cross_ratio(a, b, c, d):
return ((c - a) * (d - b)) / ((c - b) * (d - a))
print(f"Cross ratio of 0, 1, 2, 5: {cross_ratio(0, 1, 2, 5):.2f}")
print(f"Cross ratio of 10, 11, 12, 15: {cross_ratio(10, 11, 12, 15):.2f}")
# Note how translation preserves the ratio!
python
1def cross_ratio(a, b, c, d):
2return((c - a)*(d - b))/((c - b)*(d - a))
3
4print(f"Cross ratio of 0, 1, 2, 5: {cross_ratio(0, 1, 2, 5):.2f}")
5print(f"Cross ratio of 10, 11, 12, 15: {cross_ratio(10, 11, 12, 15):.2f}")
6# Note how translation preserves the ratio!
Knowledge Check
Projective transformations (homographies) preserve which property?
Answer: The cross-ratio of four collinear points.
Projective transformations (homographies) preserve which property?
Perspective and Projections
Projective geometry provides the mathematical foundation for computer vision and 3D graphics, where 3D scenes are projected onto 2D image planes (cameras).