/ART/PERSPECTIVE

Perspective: The Geometry of Seeing

Artists use vanishing points. The camera model explains them with a rotation matrix and one division. Drag the view. The matrix and the vanishing points update live.

CAMERA // 2-POINT
YAW θ+032° PITCH φ+000° FOCAL f0640
R = Rx(φ)·Ry(θ)
[ +0.85 +0.00 +0.53 ]
[ +0.00 +1.00 +0.00 ]
[ -0.53 +0.00 +0.85 ]
VP_X(+1620, 245) VP_YAT INFINITY VP_Z(-410, 245)
Drag to turn the camera
Parallel edges meet at one vanishing point

The matrix behind the picture

The camera turns the world with a rotation matrix, then divides by depth. A world point $\mathbf{p}$ becomes a camera point $\mathbf{p}_c$, then an image point $(u, v)$:

$$ \mathbf{p}_c = R_x(\varphi)\,R_y(\theta)\,(\mathbf{p} - \mathbf{c}), \qquad u = f\,\frac{x_c}{z_c}, \qquad v = f\,\frac{y_c}{z_c} $$

The division by $z_c$ is the whole trick. Far objects have a large $z_c$, so they project small. That single division makes railroad tracks converge.

A vanishing point is the image of a direction. Move along a direction $\mathbf{d}$ without limit. The projected point goes to:

$$ u_{\text{vp}} = f\,\frac{(R\,\mathbf{d})_x}{(R\,\mathbf{d})_z}, \qquad v_{\text{vp}} = f\,\frac{(R\,\mathbf{d})_y}{(R\,\mathbf{d})_z} $$

The position of the line drops out. Only the direction stays. As a result, all edges with the same direction meet at the same vanishing point. When $(R\,\mathbf{d})_z = 0$, the direction is parallel to the image plane. Its vanishing point is at infinity, and its edges draw as parallel lines. The robot-arm notes use these same rotation matrices.

TRY_IT // PROJECT_A_BOX

Edit the code. Press RUN.

What the artist counts

1-Point

Look straight down the street. Two axes stay parallel to the canvas. Only the depth axis converges. One vanishing point sits on the horizon.

2-Point

Turn to face a corner. Both horizontal axes converge. Two vanishing points sit on the horizon. Vertical edges stay vertical.

3-Point

Tilt the camera up or down. The vertical axis also converges. The third vanishing point leaves the horizon. Towers taper toward the sky.

FIG // DRAFTING_VS_SEEING

Move the slider: camera walks away, lens zooms in
The orange edges are parallel in the part

Perspective in CAD and motion studies

A CAD drawing must carry true dimensions. The perspective divide changes a length with its depth, so drafting removes the divide. Move the camera far away, and zoom in so the part keeps its size. The ratio $f/z_c$ then goes to one constant $s$ for every point:

$$ u = f\,\frac{x_c}{z_c} \;\longrightarrow\; u = s\,x_c \qquad (z_c \to \infty) $$

This limit is orthographic projection. Parallel edges stay parallel. There are no vanishing points. The front, top, and side views on a drawing are parallel projections along the three axes. The isometric view is a parallel projection along the cube diagonal, with the part turned $45^\circ$ and tipped $35.26^\circ$, the pose in the figure above.

Motion studies go the other way. A machine-vision camera obeys the full perspective model on this page. A robot finds the pose of a part when it inverts these equations, with the same rotation matrices as our Machine Design course and the inverse-kinematics simulation. The artist, the drafter, and the robot all use one geometry. They keep or drop the divide by $z$.

TRY_IT // DRAW_BOTH_PROJECTIONS

Edit the code. Press RUN.