Points and rays
A 2D point gets a third coordinate 1. Converting back divides by the last coordinate:
The same works in 3D, which is how scene points enter the camera's projection matrix:
Homogeneous coordinates are scale invariant: for any ,
So a point is really the whole ray through the origin, and the image plane is just where we look at it. In the 3D view, every vector on the ray through lands on . This is also why a camera cannot recover depth from a single image: the whole projection ray maps to one pixel.
Lines and intersections
A line is written as the vector . A point lies on the line exactly when . Like points, lines are only defined up to scale. Two cross products do all the work:
In the 3D view each line is a plane through the origin (the tinted triangles). Two such planes meet in a ray, and that ray is the intersection point .
Parallel lines and points at infinity
In Cartesian coordinates parallel lines never meet. In homogeneous coordinates the cross product still gives an answer, . A point with cannot be divided out: it is a point at infinity in the direction . In the 3D view, the planes of two parallel lines meet in a ray that lies in the plane , parallel to the image plane, so it never hits it.
This is exactly what happens in perspective images. Parallel lines in the scene have the same direction, and their images meet at a vanishing point: the image of their common point at infinity. Unlike here, the vanishing point is usually at a finite position in the image, because the camera looks at the lines at an angle.
Try this
- Move in “Scale invariance”. The highlighted vector slides along its ray, but stays the same.
- Set to a negative value. The vector moves to the other side of the origin and is still the same point.
- Set . is not a point, which is why must be non-zero.
- Check that in the values panel, then drag and see that it stays 0.
- Drag until the lines are almost parallel. moves far away and its gets close to 0.
- Press “Make l₂ parallel to l₁”. Now exactly, and in the 3D view the intersection ray lies in the plane .
- Select as the vector to scale while the lines are parallel. Scaling keeps : the point stays at infinity.
- Drag onto . The cross product of two equal points is , so they do not define a line.