Let a line segment in three-dimensional space be projected on to a two-dimensional plane, with a given centre of perspective. The mid-point of the projected line segment has a corresponding inverse point in the original line segment. Foreshortening usually causes this apparent mid-point to differ from the actual mid-point of the original line segment. The apparent mid-point and the two end-points of the original line segment each has a depth coordinate in a Cartesian system which has the origin at the centre of perspective and a depth axis perpendicular to the plane of projection.

**Proposition: the depth coordinate of the apparent mid-point is the harmonic mean of the depth coordinates of the end-points.**

This proposition is useful in photography, as depth of field is optimised if the camera is focused at the harmonic mean of the distances of the nearest and farthest objects required to be sharp. This proposition means that optimal depth of field can be obtained by focusing on an object midway *in the viewfinder* between near and far objects, provided that this object is on a straight line *in the scene* between the near and far objects.

On 1996-05-28, Martin Tai posted an article Hyperfocusing the Tulips in rec.photo.technique.misc news group proving the harmonic mean relationship for the special case when focusing on an object at the centre of the viewfinder, with the near and far points at the top and bottom of the viewfinder. Our proposition shows that this technique can be used with objects anywhere in the viewfinder.

An elementary proof follows. In the figure below, the 3D line segment has end-points (x_{1},y_{1},z_{1}) and (x_{3},y_{3},z_{3}). The plane of projection is z = 1, perpendicular to the depth axis z, and the centre of perspective is at the Cartesian origin (0,0,0). In the plane of projection, the 2D line segment has end-points (X_{1},Y_{1}) and (X_{3},Y_{3}) and the mid-point is (X_{2},Y_{2}). The apparent mid-point of the 3D line segment is at (x_{2},y_{2},z_{2}).

I. For the perspective projection of the end-points and the apparent mid-point:-

X_{1}= x_{1}/ z_{1}

Y_{1}= y_{1}/ z_{1}

X_{2}= x_{2}/ z_{2}

Y_{2}= y_{2}/ z_{2}

X_{3}= x_{3}/ z_{3}

Y_{3}= y_{3}/ z_{3}

II. For the actual mid-point of the line segment in the plane of projection:-

X_{2}= (X_{1}+ X_{3}) / 2

Y_{2}= (Y_{1}+ Y_{3}) / 2

III. Using the perspective equations [I] to eliminate the projected points from the mid-point equations [II]:-

x_{2}= (z_{2}/ 2z_{1})x_{1}+ (z_{2}/ 2z_{3})x_{3}

y_{2}= (z_{2}/ 2z_{1})y_{1}+ (z_{2}/ 2z_{3})y_{3}

IV. The incidence of (x_{2},y_{2},z_{2}) on the line joining (x_{1},y_{1},z_{1}) and (x_{3},y_{3},z_{3}) can be expressed using the parameter t, where 0 ≤ t ≤ 1:-

x_{2}= (t)x_{1}+ (1 - t)x_{3}

y_{2}= (t)y_{1}+ (1 - t)y_{3}

z_{2}= (t)z_{1}+ (1 - t)z_{3}

V. Comparing the first two of equations [IV] with equations [III]:-

t = z_{2}/ 2z_{1}

1 - t = z_{2}/ 2z_{3}

VI. Eliminating t gives:-

z_{2}/ 2z_{1}= 1 - z_{2}/ 2z_{3}

VII. Multiplying by 2z_{1}z_{3} gives:-

z_{2}z_{3}= 2z_{1}z_{3}- z_{2}z_{1}

VIII. Hence:-

z_{2}= 2z_{1}z_{3}/ (z_{1}+ z_{3})

z_{2}is the harmonic mean of z_{1}and z_{3}, QED.

Christopher B. Jones

Sydney, Australia

2008-03-19