Constructing a view

The quadrilateral no rectangle casts

The relation that reads a camera out of a drawn rectangle has a minus sign in it, and the minus sign is a refusal: two vanishing points on the same side of the assumed centre give the square root of a positive number, and no camera makes that quadrilateral out of a rectangle. Watching the refusal arrive shows what it is worth — one corner has to travel most of the picture's width before it fires.

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

f2=(v1p)(v2p)f^{2} = -(\mathbf{v}_1 - \mathbf{p})\cdot(\mathbf{v}_2 - \mathbf{p})

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.

A quadrilateral no rectangle castsThe outlined quadrilateral is a projected rectangle with one corner slid 895 px along the picture. Reading it back needs the two vanishing points to fall on **opposite** sides of the assumed centre of the picture, because the focal length is the square root of minus their product about that point. Here they fall at 220 and -8831391, and the centre is at 345: the product is 1.59e+9. It is positive, so there is no focal length, and the honest answer is that no camera makes this quadrilateral out of a rectangle — a refusal rather than a NaN in a caption. The corner has to travel 895 px before the refusal fires, and that is the honest size of this test: with the two vanishing points far apart, almost any quadrilateral is the image of some rectangle from some camera.horizona rectangle casts thiscorrect from 19 cm, at 160 mm wideproduct -1.63e+6 · focal 1276.8 px
Fig. 1 A quadrilateral that is refused. It began as a projected rectangle and had one corner slid along the picture; the two vanishing points now fall on the same side of the centre and the product is positive.

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.

Every eye that could have drawn it lies on one arcThe four corners of a rectangle on the floor, drawn. Its two vanishing points are the ends of the arc, and the eye — folded flat into the picture about the horizon — has to see them at a right angle, so it lies on the circle having them as a diameter. Sliding the assumed centre of the picture along the horizon slides the station round the arc: at 50% of the way between the two vanishing points the focal length comes out 1129.9 px and the rectangle is reconstructed 0.2830 wide for every one deep, with its corners at right angles to 1.1e-13°. The camera that actually drew it is the mark on the arc at 812.8 px. Nothing in the four corners chooses between them.vanishing point 1vanishing point 2where the camera wasassumed centre 50% alongfocal 1129.9 px · 0.283 : 1
Fig. 2 The same fact drawn as the arc. The assumed centre has to lie strictly between the two vanishing points, because the perpendicular from it has to reach the circle those points are a diameter of.

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 focal length runs away, and then there is noneSliding one corner moves one vanishing point along the horizon. The implied focal length rises from 778 px through 2158 px as that point recedes, and at 903 px of slide the point has gone through infinity and returned on the far side of the centre. From there the product of the two is positive, its square root is imaginary, and the quadrilateral is the image of no rectangle from this camera. Nothing about the drawing announces the crossing — a reader watching sees a corner move steadily — and the refusal is the only thing that does.02.5e+35e+37.5e+31e+4200400600800one corner, slid along the picture (px)focal length the quadrilateral implies (px)admitted to 886 pxrefused past 903 px
Fig. 3 The implied focal length as the corner slides. It rises from 778 pixels through two thousand and beyond as one vanishing point recedes, and at 903 pixels of slide that point has gone through infinity and returned on the far side of the centre.

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.

A quadrilateral a rectangle does castThe outlined quadrilateral is a projected rectangle with one corner slid 400 px along the picture. Reading it back needs the two vanishing points to fall on **opposite** sides of the assumed centre of the picture, because the focal length is the square root of minus their product about that point. Here they fall at 203 and 5717, and the centre is at 345: the product is -1.03e+6. It is negative, so the focal length is 1014.2 px and the quadrilateral is admitted. The corner has to travel 895 px before the refusal fires, and that is the honest size of this test: with the two vanishing points far apart, almost any quadrilateral is the image of some rectangle from some camera.horizona rectangle casts thiscorrect from 19 cm, at 160 mm wideproduct -1.03e+6 · focal 1014.2 px
Fig. 4 Partway along, still admitted. The implied camera is a long way back and the depicted rectangle is long and thin, and nothing about the drawing says it is near the edge of anything.
A quadrilateral a rectangle does castThe outlined quadrilateral is a projected rectangle with one corner slid 880 px along the picture. Reading it back needs the two vanishing points to fall on **opposite** sides of the assumed centre of the picture, because the focal length is the square root of minus their product about that point. Here they fall at 220 and 375755, and the centre is at 345: the product is -6.75e+7. It is negative, so the focal length is 8213.1 px and the quadrilateral is admitted. The corner has to travel 895 px before the refusal fires, and that is the honest size of this test: with the two vanishing points far apart, almost any quadrilateral is the image of some rectangle from some camera.horizona rectangle casts thiscorrect from 19 cm, at 160 mm wideproduct -6.75e+7 · focal 8213.1 px
Fig. 5 Just before the crossing, with the implied focal length very large. The picture is being read as very nearly a parallel projection.

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.

The constraint is real only when the vanishing points are closeThe assumed centre has to lie between the two vanishing points, so how much of a constraint that is depends entirely on the layout. Turned to 45° the two vanishing points are 1626 px apart and the band covers 100% of the picture; in the honest wide layouts both points are far outside the frame and every centre in the picture is admitted. A test that never refuses anything on the drawings a book prints is exactly the kind of check that looks like a guarantee and is a tautology.6070809010020406080the rectangle, turned on the floor (degrees)% of the picture's width that admits ittightest at 45°1626 px apart
Fig. 6 The band of assumed centres a drawn rectangle admits, as the rectangle is turned on the floor. In the honest wide layouts both vanishing points are far outside the frame and every centre in the picture is admitted, so the test refuses nothing.

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.

What the composition rule commits the reader toWith the two points one page-width apart the picture is correct from 80 mm — a 90° field of view — and a reader holding it at 400 mm sees a room 5.0 times as deep as the one drawn. Nothing about the drawing changes; the number is the layout's.0.6× the page48 mm×8.3 at 4000.8× the page64 mm×6.3 at 4001.0× the page80 mm×5.0 at 4001.4× the page112 mm×3.6 at 4002.0× the page160 mm×2.5 at 4003.0× the page240 mm×1.7 at 4004.5× the page360 mm×1.1 at 4007.0× the page560 mm×0.7 at 400distance the picture is correct from, shown 160 mm widea rule about the paperwhich is a rule about the reader
Fig. 7 The compact layout, where the two points are on the sheet and close enough for the constraint to have teeth. It is also the layout whose correct viewing distance is a fraction of the page width.

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.

How loose the test has to be before perspective preserves measureThe count of systems the table calls measure-preserving, against the tolerance. It sits at 7 across nine decades and then steps to 9 when the tolerance passes 15.6% — the drift a real pinhole picture actually produces. The exclusion in the table above is a statement about that boundary, and this is where the boundary is.02.5057.50-8-6-4-20log₁₀ of the tolerance on midpoint driftsystems counted as preserving measureperspective admitted at 15.6%the exclusion, sweptthe boundary is measured, not chosen
Fig. 8 The general shape of the complaint. A necessary condition that is nearly always satisfied is a necessary condition, and it discriminates nothing.

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.

A parallel projection is a perspective one with the eye taken awayThe four small boxes are photographs from 2.5 m, 6 m, 20 m, 200 m with the lens lengthened to match. The isometric drawing is the limit, and its bundles stay parallel to 0e+0 radians.isometric — the limit2.5 m6 m20 m200 msame box, same drawn sizethe eye recedes
Fig. 9 The limit that configuration is the picture of. Take the eye back and the projection approaches a parallel one; the vanishing points run out and the picture stops having them.

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.

The midpoint of one segment, under both familiesThe parallel projection places it exactly halfway (0e+0 px out). The perspective projection places it 22 px away from halfway, 7% of the drawn length.halfway along the drawn linethe actual midpointcorrect from 26 cm, at 160 mm wide22 px apart
Fig. 10 And what changes at that limit. A parallel projection keeps the midpoint of a segment exactly and a projection through a centre does not, so passing through the crossing is passing through the one case with no diminution in it.

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.

The same cube turned 24° — a three-point constructionNothing about the construction changed. The number of vanishing points inside any finite distance is 3, and 1 of them fall on the canvas.horizon3 vanishing points at a finite distance2564 px · 8129 px · 531 px
Fig. 11 The three-direction version, which has the same refusal and fires more often: three drawn bundles that are not three orthogonal directions give an obtuse triangle, and the orthocentre falls outside it.

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 proportion is the assumption, not the drawingEvery point of the arc reconstructs a rectangle with right angles to 5.1e-13°, and they run from 0.071 : 1 to 1.120 : 1 — a factor of 15.7. The rectangle that was actually there is 0.667 : 1, and only 2% of the arc gets within five per cent of it. A proportion read off a photograph of a rectangle is a proportion read off the assumption that the centre of the picture is the centre of the frame.012320406080assumed centre of the picture, % of the way between the vanishing pointsreconstructed proportion of the rectanglethe rectangle that was there, 0.667 : 115.7× across the arcevery one a true rectangle
Fig. 12 The sweep, which runs from just inside one vanishing point to just inside the other. Its endpoints are where this essay’s refusal fires.

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.

A box drawn from a known camera, and the camera recovered from the drawingThree vanishing points found from the twelve drawn edges alone give back the focal length to 4e-15 relative.recovered principal pointused to drawrecoveredgapfocal length853.90853.904e-15principal x345.0345.02e-12angle44.0°44.0°correct from 20 cm, at 160 mm wide44° across
Fig. 13 The three-direction recovery, which returns the spread rather than averaging it away. A spread of a per cent is a drawing that is nearly a box; a spread of a third is a drawing that is not.
The three vanishing points of one box, drawn to scale with the boxThe picture is the small rectangle. Two of the three vanishing points fall well outside it, which is why they are computed rather than located by eye.orthocentrethe pictureVP₁VP₂VP₃focal length from the triangle — 853.9 pxspread 1e-14% across three routes
Fig. 14 The triangle the three points form. Its acuteness is the same refusal one dimension up: an obtuse triangle puts the orthocentre outside and asks for an imaginary focal length.

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 by-eye step actually decidesSymmetric placement gives a cube for free. 8 points of asymmetry — invisible in the drawing — gives a box of side ratio 0.72, and ±16 points spans 0.52 to 1.94.0.50011.502-10010difference between the two by-eye placements (points)side ratio of the box the drawing depicts (1 = a cube)a cubeeven-handedthe one free choice in the taught methodand it decides the whole solid
Fig. 15 And the measurement that follows from it. The taught two-point cube is a box, and the box it is comes out of the spread rather than out of the corners looking right.

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 constraint is real only when the vanishing points are closeThe assumed centre has to lie between the two vanishing points, so how much of a constraint that is depends entirely on the layout. Turned to 45° the two vanishing points are 1626 px apart and the band covers 100% of the picture; in the honest wide layouts both points are far outside the frame and every centre in the picture is admitted. A test that never refuses anything on the drawings a book prints is exactly the kind of check that looks like a guarantee and is a tautology.6070809010020406080the rectangle, turned on the floor (degrees)% of the picture's width that admits ittightest at 45°1626 px apart
Fig. 16 The band as a fraction of the picture’s width, swept over the rectangle’s orientation. Even at its tightest the two vanishing points are 1626 px apart, which is more than twice the width of the picture they belong to, so every centre in the frame is admitted and the constraint constrains nothing.

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.

A wide render read from a screen that subtends much lessA 27-inch monitor at 650 mm subtends 49.3°. A picture rendered at 100° is therefore being read from 2.60 times its own station distance, and the viewing field has already established what that does: depth is stretched by exactly that factor and nothing in the picture changes. The two routes to the number — from two angles, and from a focal length and a display width — agree to 1e-9.051050100150field of view the picture was rendered at — degreeshow many times the depicted depth is stretchedthe screen subtends 49.3°100° → depth ×2.6027-inch monitor at 650 mmsubtends 49.3°
Fig. 17 The commitment that goes with it. A layout compact enough for the test to bite is a picture whose correct viewing distance is a fraction of its own width.

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 taught two-point cube, with the two far edges placed 8 points apartThe corner angles are 90° because the method forces them. The side ratio is 0.719, so this picture depicts a box whose depth is 1.39× shallower than its width.horizoncorner angles90.000° — forced by the methoddepicted side ratio0.7195lens this drawing implies60° acrossdrawn exactly as the method prescribesthe free step is where the far edges go
Fig. 18 A drawing that passes every check here and depicts a box 1.4 times shallower than it is wide.

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.

One conic, and the focal length falls out of itThe image of the absolute conic for a camera with square pixels is a circle of radius f about the principal point. Two vanishing points of perpendicular directions must be conjugate with respect to it, and solving that for f gives 812.769 px — the same number the orthocentre construction gives, and 1.1e-13% from the focal length the camera was built with.horizonprincipal pointv_zorthocentre: 812.7691 px · vᵀωu = 0: 812.7691 pxconjugacy residual 5.9e-10 in focal-length unitscorrect from 19 cm, at 160 mm wide46° across
Fig. 19 The conic all three are statements about. A camera is a conic in its own picture, and the refusals are the cases where a pair of directions cannot be conjugate with respect to any real one.
Two points, and everything metric followsThe imaged circular points are where the horizon meets the image of any circle in the plane, and they are a conjugate pair — the first coordinate here is 169.5 − 446.0i. A rectification built from them and nothing else returns the world's angles to 2.2e-13° and its length ratios to 5.6e-15, and no length at all.horizonthe horizon does not cut the circle — the pair is complexrectified from the two points aloneangles: 2.2e-13°ratios: 5.6e-15length: —circle of radius 1.05 ma dash is a quantity two points cannot buy
Fig. 20 And the two imaginary points the conic meets a plane’s vanishing line at. Their being imaginary is the same minus sign once more: a real pair would be a direction that is its own perpendicular.

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.

One reconstruction, drawn at its own scale and at 3.4×The courtyard recovered from two pictures, seen from above. Every pairwise distance ratio matches the world's to 6.3e-14, so the shape is exact. The size is not determined at all: the right-hand plan is the same reconstruction 3.4 times larger and fits the same two pictures equally well. One measured length in the scene — here 0.800 m — fixes it, and nothing in the pictures can.as recovered0.308 across× 3.4 — same two pictures1.046 acrossworst ratio deviation 6.3e-14size fixed only by a supplied 0.80 m
Fig. 21 The general form of that counting. What a single view determines is bounded by how many numbers the drawing has, and the drawing here has too few.

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.

Three views, and two solids that draw themA cube on a 6-cell grid. The three views along the top are drawn by the 216-cell solid on the left and by the 76-cell solid on the right — every filled square in every one of the three views is filled by both. The views bound the solid and do not determine it.front view · 36 filledtop view · 36 filledside view · 36 filledthe largest solid with these views — 216 cellsand a solid with the same views — 76 cells6 × 6 × 6 cellsthe three views are identical; the solids differ by 140 cells
Fig. 22 And what over-determination looks like when it does bite: three views that determine a visual hull and nothing tighter, which is a refusal a count predicts in advance.

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.

Named objects

A flat tag is an object no other essay names yet.

ConditioningDegeneracyDemonstrationDepicted rectangleFocal recoveryFree parameterHorizonpoint at infinityPrincipal pointVanishing point