The quadrilateral no rectangle casts
Worth reading first: The arc every eye stands on · The cube that is a box · One, two and three point are one construction.
Every recovery on this site has a refusal in it somewhere, and most of them are stated once and never fired. This one can be watched arriving.
The relation that turns two vanishing points into a focal length is
and the minus sign is doing work. If the dot product is negative the square root exists and there is a camera. If it is positive there is no real focal length, and the honest report is not a number but a sentence: no camera makes this quadrilateral out of a rectangle.
What the sign means geometrically
The dot product is taken about the principal point, so it is asking which side of the centre each vanishing point falls on.
Two perpendicular directions in a plane through the eye must straddle the optical axis: one of them turns away one way and the other the other way, because they are ninety degrees apart and the axis is between them. So their vanishing points fall on opposite sides of the principal point along the horizon, and the product of the two displacements is negative.
Two vanishing points on the same side of the centre are two directions on the same side of the axis, which are less than ninety degrees apart, and no rectangle has those.
So the admissible assumed centres are exactly the open segment between the two vanishing points, and the refusal fires outside it. That is a clean statement, it is exactly right, and it is much weaker than it sounds.
Watching it fire
Take a genuine projected rectangle and slide one corner along the picture. The two vanishing points move; the quadrilateral goes on looking like a plausible drawing at every step; and at some point the relation stops having an answer.
What happens in between is worth drawing, because it is not a wall the drawing runs into.
The vanishing point runs out along the horizon, off to infinity — which is the configuration in which that pair of edges is drawn parallel — and comes back from the other end. Everything up to that moment is a valid rectangle seen from an increasingly distant camera. Everything after it is refused.
So the boundary is not a discontinuity in the drawing. It is a discontinuity in what the drawing can be a picture of, and a reader watching sees a corner move steadily.
How weak the test is
The corner has to travel 895 pixels on a 690-pixel-wide picture before the refusal fires. That is not a subtle distortion. It is a gross one, and a reader looking at the two quadrilaterals side by side would not confuse them.
That is the whole finding of this rung and it is a negative one. The admissibility test is a real constraint that is almost never binding. It fires when the two vanishing points are close together on the page — which is the compact layout a book prints — and it says nothing at all when they are far apart, which is every honest picture.
It is worth being blunt about what that means. A test that passes everything a person would draw is not a check on drawings; it is a check on implementations, and it is worth having for exactly that reason. A routine that returned the square root of a positive number as a NaN, and then propagated the NaN into a caption, would be a real defect and this refusal is what prevents it.
The parallel case, which is the interesting boundary
There is one configuration on the way to the refusal worth stopping at, because it is a picture people draw on purpose.
When one vanishing point runs out to infinity, that pair of opposite edges is parallel on the page. That is a one-point drawing of the rectangle: one pair of edges recedes and the other pair does not. The relation does not refuse it — a point at infinity is an ordinary point of the horizon — and the implied focal length is unbounded, which says the camera is infinitely far away, which is a parallel projection.
So the boundary between admitted and refused runs through the parallel case, and passing through it is passing through “the camera was infinitely far away”. On one side of it the camera is behind the picture plane; on the other it would have to be in front, which is what a positive product means.
That reading makes the refusal less mysterious than it looks. It is not a numerical accident and it is not an arbitrary sign convention: it is the statement that the eye has to be on the eye’s side of the glass.
Why the check has to exist anyway
Three reasons, and the first is the one this site keeps rediscovering.
A refusal that never fires is still the difference between a wrong answer and no answer. The drawings that fail are rare and they exist — a hand-drawn illustration, a diagram assembled from parts, a quadrilateral traced off something that was not a rectangle — and on those the alternative to refusing is quoting a focal length that came out of a square root of a negative number.
It says which assumed centres are available. The band is a genuine constraint on the principal point, and in the layouts where it is narrow it is worth using: the centre of the picture cannot be outside the two vanishing points, whatever the camera’s data sheet says.
And it is the boundary of the arc. The arc of stations ends where the refusal begins, so knowing where the refusal is, is knowing how long the one-parameter family is. That is not a separate fact — it is the same fact indexed differently — and the arc every eye stands on sweeps exactly the admissible interval and no further.
The stronger test the site does have
There is a version of this with real teeth and it needs a box rather than a rectangle.
Three bundles of edges give three vanishing points, three pairs, and three focal lengths. They must agree. A drawing that is not a projection of a rectangular box gives three different answers, and their spread is a measurement of how far from rectangular the depicted solid is.
That is a test that discriminates, because it uses information the drawing did not have to supply. One rectangle supplies one equation and there is nothing to disagree with; a box supplies three and they can.
What the band is worth, measured
The admissible interval is a constraint on the principal point, so it is fair to ask how much of a constraint.
Swept over the angle a rectangle is turned on the floor, the band covers essentially the whole picture for most orientations. It narrows when the rectangle is turned toward forty-five degrees, which brings the two vanishing points closest together, and even there it covers a large fraction of the frame in a camera of ordinary field.
The way to make it bind is to make the picture wide, which brings the vanishing points in. A ninety-degree field with a rectangle at forty-five degrees puts both vanishing points on the sheet and the band is then a real interval inside the frame — and that is the layout both vanishing points on the paper prices as a commitment about where the reader has to stand.
Which leaves a pleasing conclusion and a mildly annoying one. The test has teeth exactly in the layouts a book prints, and those are the layouts whose geometry is least defensible for other reasons; it is toothless exactly in the layouts that are honest.
What this does not say
It says nothing about a drawing being right. Passing the admissibility test means some camera makes this quadrilateral out of some rectangle, which is nearly always true. It says nothing about which rectangle, which is the proportion is the assumption, and nothing about whether the rectangle is the one the draughtsman intended.
It says nothing about noise. On a real picture the two vanishing points are fitted, and near the boundary a fitted vanishing point can be on either side of the centre depending on a pixel. The refusal is exact and its input is not.
And it does not make an unrefused drawing safe. The most useful thing to say about this test is what it does not catch, which is everything the wrong field is about: constructions that are admissible, plausible, internally consistent, and depict something nobody chose.
The refusal in the other recoveries
It is worth listing where else this sign appears, because the same minus sign is the refusal in three different routines and it is the same statement each time.
The two-point relation, which is this essay’s. Two vanishing points and an assumed centre; a positive product means no camera.
The orthocentre construction, which needs the principal point to fall inside the vanishing triangle. The three dot products must all be negative, and the recovery reports which one was positive rather than taking a square root of it.
And the conic form, which is the general statement of both: two vanishing points of perpendicular directions must be conjugate with respect to the image of the absolute conic, and conjugacy with respect to a conic of that shape is exactly the negative dot product. One conic calibrates the camera makes the point that the awkward case distinction in the orthocentre construction — altitudes meeting inside for an acute triangle and outside for an obtuse one — is this sign, expressed geometrically instead of algebraically.
Three routines, one sign, three refusals that are the same refusal. That is worth knowing because it means fixing the sign convention in one of them and not the others would produce three answers that disagree about which drawings exist.
What a stronger test would have to use
If the admissibility test is toothless, the fair question is what would have teeth on a single drawn quadrilateral.
The answer is nothing, and the reason is a count. A quadrilateral is eight numbers. A rectangle in space is determined up to a similarity by one number — its proportion — and its pose by six more, and a camera by three. Eight numbers of drawing against ten of scene and camera: the map from arrangements to drawings is onto, so every quadrilateral is the image of some rectangle from some camera, and the only reason the test refuses anything at all is that the principal point was fixed in advance.
So the refusal is not a test on quadrilaterals; it is a test on the pair of a quadrilateral and an assumed centre. That is a different object and a much weaker constraint, and it is exactly why a box works: a box’s twelve drawn edges are far more numbers than a box and a camera have between them, so the drawing can be inconsistent and usually is.
The habit worth taking is to do the counting before writing the test. A check that cannot fail has not been checked.
The transferable form
A necessary condition is worth implementing and worth measuring, and the measurement usually shows it is not the check anybody thought it was. What it protects is the routine, not the drawing.
Every gate in this site’s own wrong field was written after a taught rule was measured and found to be exact in one situation. This is the same shape in the other direction: a test that is exactly right, that fires correctly, and that fires on nothing anybody would produce.
Both halves are worth having and they should not be confused. The refusal keeps focalFromTwoPoints from returning nonsense, which is a real defect it has prevented. Believing it constrained the drawings would have been the error, and the eight hundred and ninety-five pixels are what stops the belief.
What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- Perpendicular is a pairing — both name demonstration, focal recovery, horizon, principal point, vanishing point
- A light far enough away — both name conditioning, horizon, point at infinity, vanishing point
- A projector is a camera run backwards — both name demonstration, depicted rectangle, focal recovery, vanishing point
- The picture whose lines spread — both name demonstration, depicted rectangle, point at infinity, vanishing point
- The third point put where it looks right — both name conditioning, horizon, principal point, vanishing point
- A height, out of one photograph — both name horizon, point at infinity, vanishing point
Named objects
A flat tag is an object no other essay names yet.
ConditioningDegeneracyDemonstrationDepicted rectangleFocal recoveryFree parameterHorizonpoint at infinityPrincipal pointVanishing point