The new thread on reverse engineering, and the large number who have asked me to explain how I calculate dimensions from perspective pictures (such as the Kratzer dial at Oxford), prompt me to post the answer, rather than replying privately.
 
Given only a perspective painting or photograph of a 3D object, you can easily find the true dimensions of the object. All you need is three lines, each at right angles to the others in the 3D world. For instance, for a horizontal dial use the 12 o'clock and 6am-6pm lines and a vertical. For a vertical, such as a stained glass dial, the 12 o'clock line is normally vertical, the top of the dial horizontal and you need to find another horizontal line normal to the window, such as a wall. Measure the angles, in the picture, between these lines, apply one of my formulae and you get the scale factors. You can now easily reverse engineer the dial.
 
I found the equations from first principles. They are very simple, so probably well-known. In fact, I can offer two sets of equations. The first give the relative scale factors by which perspective has reduced dimensions in each direction. The second are slightly more complex but give the true scale factors.
 
First, the maths for the simplest case: Given a point O at which three equal-length orthogonal lines OA, OB and OC meet, their apparent lengths in a perspective picture are in the proportions:
 
                     OA/sqrt(sin(2*BOC)) = OB/sqrt(sin(2*COA)) = OC/sqrt(sin(2*AOB))
or
                    OA^2 / sin(2*BOC) = OB^2 / sin(2*COA) = OC^2 / sin(2*AOB)
 
where OA^2 means OA squared, sqrt means square root, and BOC is the angle in the picture between OB and OC and therefore opposite OA. If this is greater than 90 degrees, first subtract 90 from it or subtract it from 180. If greater than 180, first subtract 180.
 
Although these equations give the relative proportions in the three directions, you might sometimes want the true dimensions, especially if you have two sets of orthogonal axes. By 'true' dimensions, I mean the dimensions the picture of the object would have if seen face-on instead of in perspective. For this, you can use:
 
                   OA^2 = 1 - cot(AOB)*cot(AOC)
                   OB^2 = 1 - cot(AOB)*cot(BOC)
                   OC^2 = 1 - cot(AOC)*cot(BOC)
 
where cot is cotangent (1/tangent). If all angles are greater than 90 degrees, you may subtract them from 180 for convenience (but you must not subtract 90 from them for these equations to work).
 
Note that the three orthogonal lines do not need to meet at a point. If they don't, just measure the angles of the triangle they enclose. If you label this triangle ABC, dimensions in the BC direction, for instance, have been compressed by sqrt(1 - cot(ACB)*cot(ABC))
 
Next, how you use them:
- Measure the angles in the picture between three orthogonal lines such as edges. Ideally, these should meet at a point. If not, choose lines that are near one another in the picture (so the triangle is small).
- Subtract from 180, or subtract 180 as needed to reduce the angles to the range 0 to 90.
- Double each angle and calculate the square root of the sine of the doubled angle.
You now have three numbers that are the relative scale factors that represent how much dimensions have been compressed in the picture due to perspective.
-optionally, calculate the cot of each angle and apply the second set of equations.
 
The true proportions of the original 3D object can be calculated by dividing any measured length by the compression factor. But be aware that the factors vary across the picture and from top to bottom, unless it was taken with a telephoto lens. So, for most accuracy, repeat the calculations at all the points where you can identify three orthogonal lines.
 
Here's a concrete example, using a print of the photo on the MHS Web site of the Kratzer dial in Oxford. I don't think I can attach pictures on this mailing list, and I can't copy the photo without permission, but can send an explanatory diagram to anyone who asks off list.
 
Through the top left corner of the vertical south-facing dial, I drew a line which would be horizontal and north-south on the octagonal west face. I measured the angles between the vertical, East-West and South-North lines meeting there. The angles opposite these lines are 155, 103 and 102 degrees respectively.
Subtract 90 from these to give 65, 13 and 12 degrees. (Or, subtract each from 180, to give 25, 77 and 78, if you prefer.)
For each, calculate sqrt(sin(2 * angle)), to give, approximately:
0.875, 0.66, 0.64
 
I measured the three lines as 44mm, 45mm and 77mm respectively.
Dividing these by the scale factors gives
44/0.875 = 50 units,
45/0.66 = 68 units,
77/0.64 = 120 units
 
So the height of the south-facing vertical dial is 50/68 or 74% of its width.
And the width of the octagonal West-facing dial is 2.4 times the length of its vertical edges.
 
Applying the second set of equations to the same angles gives:
 
sqrt(1-cot(103)*cot(102)) = 0.975
sqrt(1-cot(102)*cot(155)) = 0.738
sqrt(1-cot(155)*cot(103)) = 0.711
 
so the true dimensions in the scale of the picture, if the respective lines were viewed face-on, would be:
44/0.975 = 45mm
45/0.738 = 61mm
77/0.711 = 108mm
 
These are all about 10% smaller than the first method. They are the true figures, but the first method gives correct relative results and is easier to use so may be preferred for its simplicity.
 
As the camera was quite close to the subject, the perspective changes over the picture, so for greater accuracy you could do the same calculation at several other corners and average the results.
When I did this for the end of the polyhedral dial in The Ambassadors, I found that it isn't square. Its proportions are, from memory, about 0.85 : 1 which seems quite a big error, but perhaps results from Holbein's inaccuracy. To the naked eye it looks square, I think.
 
Hope this is helpful to you
 
Regards
Chris Lusby Taylor
51.4N, 1.3W
 

Reply via email to