Surfaces that are not flat

One parameter between two surfaces

Wide architectural views are usually made on a projection with a number attached to it — a family running from the flat plane at one end toward the cylinder at the other, with everybody using the value one. That value has never been given a geometric defence. Measured across the family on this site's own battery, the worst angular error over the field has a minimum, and the minimum is at 1.04.

Worth reading first: When the picture surface is not flat · The cylinder, and the price of going all the way round.

The curved field on this site compares six picture surfaces and treats each as a fixed object: the plane, the cylinder, the sphere unrolled, and three fisheyes. That framing hides something, because two of those six are the ends of a one-parameter family and the interesting members are in between.

The family has a name in the software that implements it, and one setting of it is what most wide architectural pictures are made on. What it has never had is a number saying why that setting.

One family, one parameter, and where the convention sits in itThe same room on five members of the Panini family, each scaled so 130° of the world spans the same width. Every member keeps a vertical line vertical; only d = 0, the flat plane, keeps a general one straight. The worst angular error over the field is smallest at d = 1.00, at 16.84°.d = 0d = 0.5d = 1d = 2d = 4d = 0straight48.06° angle×17.80 aread = 0.54.81% bend23.08° angle×4.66 aread = 17.21% bend16.84° angle×2.65 aread = 29.61% bend23.13° angle×1.57 aread = 411.54% bend32.71° angle×1.73 areaa general straight line · worst angle · area range, over the field130° acrossangular minimum at d = 1.00
Fig. 1 The same room on five members of the family, each scaled so that 130° of the world spans the same width of page. The parameter is where the projection centre sits behind the cylinder’s axis: zero is the flat plane exactly, and larger values flatten the azimuth toward the cylinder’s.

The construction

Take a cylinder of unit radius about the vertical through the eye, as the cylindrical panorama does. A cylindrical picture projects each direction onto that cylinder from the eye, at the axis. This family projects from a point dd behind the axis instead, along the view direction, and then unrolls.

Writing θ\theta for the azimuth of a direction and rr for its horizontal distance from the axis, the map is

u=(d+1)sinθd+cosθ,v=(d+1)y/rd+cosθu = (d+1)\,\frac{\sin\theta}{d + \cos\theta}, \qquad v = (d+1)\,\frac{y/r}{d + \cos\theta}

At d=0d = 0 that is u=tanθu = \tan\theta, which is the flat plane exactly — the same x/zx/z every photograph is. As dd grows the azimuth flattens toward the cylinder’s even spacing without ever reaching it.

The one member with a closed form worth naming is d=1d = 1, where the azimuthal half becomes 2tan(θ/2)2\tan(\theta/2). That is the stereographic map of the horizon circle, and it is the entire geometric argument usually given for the value everybody uses.

What every member keeps

One property runs through the whole family and it is the reason the family exists.

Every member images a vertical world line as a vertical straight line. The azimuth is constant along a vertical, and the map’s first coordinate depends on nothing else, so uu is constant and the image is a vertical segment. Measured over five members at d=0,0.5,1,2,4d = 0, 0.5, 1, 2, 4, the worst departure from straight is under 101610^{-16} of the chord — the arithmetic floor, at every member.

That is why architectural photographers reach for it. A wide flat picture of a building keeps its verticals too, but only by paying at the edges; a cylindrical picture keeps them and bends every horizontal; and this family keeps them at every setting while offering a choice about everything else.

And only the member at d=0d = 0 keeps a general line straight, which is the price. At d=0.5d = 0.5 a general straight line bows by 4.81% of its own chord, at d=1d = 1 by 7.21%, at d=2d = 2 by 9.61%, at d=4d = 4 by 11.54%. The bend grows monotonically with the parameter and there is no member but the plane where it is zero — which is Beltrami’s theorem again, arriving inside a family rather than across one.

One family, one parameter, and where the convention sits in itThe same room on five members of the Panini family, each scaled so 80° of the world spans the same width. Every member keeps a vertical line vertical; only d = 0, the flat plane, keeps a general one straight. The worst angular error over the field is smallest at d = 1.00, at 10.74°.d = 0d = 0.5d = 1d = 2d = 4d = 0straight20.42° angle×2.99 aread = 0.54.81% bend12.23° angle×2.06 aread = 17.21% bend10.74° angle×1.72 aread = 29.61% bend12.23° angle×1.45 aread = 411.54% bend15.01° angle×1.43 areaa general straight line · worst angle · area range, over the field80° acrossangular minimum at d = 1.00
Fig. 2 The same family over a narrower field. Everything shrinks toward the plane’s behaviour, because the whole family agrees to first order about the centre of the picture and differs only in how it treats the periphery.

The battery

The site’s curved field measures a surface on three things: how far it bends a straight line, how far it moves a right angle, and how far the area scale runs. Run across the family, all three produce a table with a shape.

dd bend worst angle area range
0 straight 48.06° ×17.80
0.5 4.81% 23.08° ×4.66
1 7.21% 16.84° ×2.65
2 9.61% 23.13° ×1.57
4 11.54% 32.71° ×1.73

The bend column is monotonic. The area column is nearly monotonic, falling steeply and then flattening.

The angle column is not monotonic at all. It falls from 48.06° at the plane to 16.84° at d=1d = 1, and then rises again to 23.13° at d=2d = 2 and 32.71° at d=4d = 4. It has a minimum, and the minimum is close to the value everybody uses.

Why the angle column is the one to read

Three columns and only one of them has a minimum, which invites the question of why that one carries the argument.

The bend column cannot have an interior minimum. Straightness is a property the plane has and nothing else has, so any departure from d=0d = 0 costs bend and every further departure costs more. A family containing the plane has its straightness optimum at an end by construction, and an end is not a choice — it is the refusal to choose.

The area column falls steeply and flattens. Its best value is at the far end of the family, which is a surface nobody uses for a picture of a building, so the column argues for a value the practice rejects. That is a signal that area is not what the practice is optimising, and it is worth saying rather than quietly dropping the column.

The angle column is the only one whose best value is interior. Both ends are bad — the plane is 48.06° at the corners of a 130° field, the far end 32.71° — and the middle is not. So if the convention is defensible on any of the three quantities the site measures, it is defensible on this one, and the measurement is what turns that “if” into a number.

Where the minimum is

Scanning the parameter finely rather than at five marks puts the minimum of the worst angular error at

d=1.04d = 1.04

at 16.82°, over a 130° by 50° field. The minimum of the worst anisotropy — the other half of conformality, which this site insists on measuring separately after the cylinder passed an angle-only test three phases ago — sits at d=0.98d = 0.98.

So the conventional value is within four per cent of both minima, and the two minima are not the same point. That is a real defence of the convention and a qualified one, and both halves are worth stating.

The defence: the value in universal use is the one that minimises the worst angular distortion over the field, and the minimum is genuine rather than a plateau — the curve rises by a third of its value by d=2d = 2.

The qualification: the two criteria disagree, so a picture chosen for shape fidelity and one chosen for isotropy are not the same picture, and neither is exactly at d=1d = 1. The usual argument for the value — that the azimuthal half becomes stereographic there — picks out d=1d = 1 exactly and is a statement about half the map. It happens to land near the minimum of a property of the whole map, and the near-coincidence is not an explanation.

One family, one parameter, and where the convention sits in itThe same room on five members of the Panini family, each scaled so 170° of the world spans the same width. Every member keeps a vertical line vertical; only d = 0, the flat plane, keeps a general one straight. The worst angular error over the field is smallest at d = 1.00, at 23.14°.d = 0d = 0.5d = 1d = 2d = 4d = 0straight80.94° angle×2029.01 aread = 0.54.81% bend38.29° angle×15.58 aread = 17.21% bend23.14° angle×4.55 aread = 29.61% bend38.37° angle×1.58 aread = 411.54% bend57.03° angle×2.72 areaa general straight line · worst angle · area range, over the field170° acrossangular minimum at d = 1.00
Fig. 3 The same measurement over a much wider field. The location of the minimum depends on how much of the world is being asked about — which is the honest caveat, and the reason the field sampled is printed on the figure rather than assumed.

The minimum moves with the field

That last caveat is worth a measurement of its own rather than a sentence, because it decides how much the result is worth.

The battery samples a rectangular fan of directions, and the numbers in the table are worst cases over that fan. Widen the fan and the worst case is taken further off axis, where the family’s members differ more; narrow it and they converge toward the plane.

So the minimising parameter is a function of the field, and quoting it without the field is quoting half a result. Over the 130° by 50° fan used here it is 1.04. That is the number this essay claims, and the figure prints the field beside it for exactly that reason.

What does not move is the shape of the curve. There is a minimum at every field width tried, it is interior rather than at an end, and it is near one. A family whose angular error fell monotonically would have no defensible interior value at all, and this one does.

Straight, or conformal — the corner that is emptySix picture surfaces plotted by how much they bend a straight line (across) against how far they are from preserving shape (up). The plane sits on the left edge and the top; stereographic on the bottom and the right. Nothing sits in the bottom-left corner, and by Beltrami's theorem nothing can.straight AND conformal — empty10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹10⁰10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹10⁰10¹10²bend of a straight line, as a fraction of its own chorddeparture from conformal (degrees, or % of anisotropy)planecylinderstereographicequidistantequal-areaequirect.sampled over a 130° fanlower left would be a surface with no cost
Fig. 4 The trade the family is negotiating, for the six fixed surfaces. The plane sits at the straight edge and stereographic at the conformal one; the family runs between them and touches neither, which is what a compromise is.
One room at 130° across, cast onto six picture surfacesEach panel holds the same angular width of the same scene. The flat plane keeps every straight line straight and pays for it at the edges; the five curved surfaces bend the ground lines by 3.5% to 6.0% of their own length.plane — bend 0.0%cylinder — bend 6.0%stereographic — bend 3.5%equidistant — bend 4.5%equal-area — bend 5.1%equirect. — bend 5.7%130° across in every panelsame scene, same angle, six surfaces
Fig. 5 The fixed six, for comparison at the same field. The family’s members sit between the first two panels, and the reason they are worth having is that neither of those two is acceptable for a building.

What the reader can check

Everything above is a measurement on a map, and the map is short enough that a reader can check the two claims that matter with a calculator.

Verticals. Take a vertical world line at azimuth 34°. Its directions all share that azimuth, the map’s uu depends only on the azimuth, so every point of the image has the same uu. That is a two-line argument and it holds at every dd; the figure’s number, under 101610^{-16} of the chord, is the arithmetic confirming it rather than the evidence for it.

The plane at zero. Set d=0d = 0 in the map. The first coordinate becomes sinθ/cosθ=tanθ\sin\theta / \cos\theta = \tan\theta, which is x/zx/z; the second becomes (y/r)/cosθ(y/r)/\cos\theta, which is y/zy/z. So the member at zero is the pinhole exactly, not approximately — the family contains the flat picture rather than approaching it.

The claims that cannot be checked by hand are the three columns, because each is a worst case over a fan of directions with a Jacobian differenced at every one of them. That asymmetry is deliberate: the two structural facts are arguments and the three numbers are measurements, and this site does not let a measurement stand in for an argument or the other way round.

What it is between

Naming the ends correctly matters, because the family is often described as running from rectilinear to cylindrical and it does not.

At d=0d = 0 it is the flat plane, exactly. As dd \to \infty the azimuthal map tends to sinθ\sin\theta rather than to θ\theta, which is an orthographic azimuth rather than a cylindrical one. So the far end of the family is not the cylinder; it is a different surface again, and the family passes near the cylinder without containing it.

That matters for the reading of the area column. The area range falls steeply through the family — ×17.80 at the plane, ×2.65 at d=1d = 1 — and then stops falling and turns back up slightly by d=4d = 4, which a family running to the cylinder would not do. The turn is the far end being a compressive map rather than an even one.

How wide the picture gets as the field of view opensOn a flat plane the picture's half-width is tan(θ/2): it multiplies by 6.6 between 120° and 170° and is unbounded at 180°. On a cylinder it multiplies by 1.42 over the same range and keeps going past 180° without incident.0246850100150field of view across the picture (degrees)half-width of the picture, in focal lengthsplanecylinderstereographicequidistantcut off at eight focal lengthsthe plane crosses it at 166°
Fig. 6 The problem the family exists to solve. A flat picture’s half-width multiplies by more than four between 120° and 170° and a cylinder’s by less than one and a half, so a very wide flat picture is mostly empty frame with the content in the middle.
Area scale across the picture, for six surfacesThe flat plane's area scale is sec³θ and leaves the frame before 70°. The equal-area fisheye is the flat line at 1, which is what its name asserts and what this measures.024680204060angle off the optical axis (degrees)area scale, relative to the centreplanecylinderstereographicequidistantequal-areaequirect.measured by differencing on the spherethe plane leaves the frame
Fig. 7 And the area cost across the field for the fixed surfaces, which is what the family’s third column is a compromise between.

The vertical is not free either

One more measurement, because the family’s headline property has a limit that its users meet.

Verticals are straight at every dd, and they are not evenly spaced. The vertical coordinate carries the same (d+1)/(d+cosθ)(d + 1)/(d + \cos\theta) factor as the horizontal one, so a vertical line far off axis is drawn longer than one at the centre — by that factor, which at d=1d = 1 and 65° off axis is about 1.4.

So a row of identical columns across a wide Panini picture is drawn straight, upright, parallel and increasingly tall toward the edges. That is the family’s characteristic look and it is not an artefact: it is the surface reporting that the edge columns subtend more of the picture, which they do.

A flat picture has the same effect and larger. A cylindrical picture has it too. There is no surface in which a row of equal verticals is drawn equal, straight and evenly spaced at once, which is the family’s trade stated in the form a photographer meets it.

The lines each surface leaves aloneA curved picture surface does not bend everything. Each panel draws the family of world lines the surface images as straight lines: two-dimensional for the plane, and a one-parameter family for every other surface here — running through the picture's centre on an azimuthal surface, and parallel on a cylindrical one.planeevery linecylinderone parameter · parallelno meeting pointstereographicone parameter · concurrentthey meet to 1e-12equirect.one parameter · parallelno meeting point3 of 4 keep a curvethe signature has three values, not eight
Fig. 8 The families of lines each surface leaves alone. The Panini family’s is the cylinder’s — the verticals and one crosswise line — which is the signature its construction inherits from the cylinder it is built on.
Every angle exact, and unrecognisableA 360 photograph re-projected stereographically from below. Every crossing in the original crosses at the same angle here — the worst departure over 160° of the sphere is 4.4e-8° — while the area scale runs over a factor of 255. Conformal is not a synonym for undistorted.angle, worst over the sphere4.4e-8°anisotropy, worst1.000000023area scale, largest over smallest×255what a reader calls distortedthe third row, not the firstthe disc is 160° of the spheredrawn to 160° off axisthe first two rows are conformality
Fig. 9 And the far end of the conformal road, for scale. Stereographic keeps every angle exactly and pays over a factor of 255 in area; the Panini family declines both extremes and pays a little of everything.
The same 84° view, projected onto a plane and onto a cylinderOn the plane every straight line stays straight (2e-13 px of bend) and the edges stretch; on the cylinder the stretch is even and straight lines bow by up to 863 px.flat picture plane — straight lines stay straightcylindrical picture surface — even stretch, bowed linesone scene, two picture surfacesneither is the distorted one
Fig. 10 The two ends of the same argument, drawn as pictures. Neither is the corrected version of the other, and the family is the admission that the choice between them is a continuum.

Where it sits in the family of answers

Three ways of making a very wide picture have now been measured on this site, and the family is the third of them.

The compass recipe chooses stereographic and accepts the area cost — every angle exact, every shape right, and the sizes gone. The cube map chooses six planes and accepts the seams — every line straight inside a face, and a kink where two faces meet. The Panini family chooses neither and takes a little of each cost.

What separates the three is not quality. It is which of the three impossible properties each declines to give up:

  • the compass recipe keeps shape and gives up size;
  • the cube map keeps straightness and gives up continuity;
  • the family keeps verticals and gives up a little of everything else.

That third one is the odd member, because “keeps verticals” is not one of the three properties the field’s battery measures. It is a property of a subset of lines rather than of the map, and a family selected for it is a family selected for what a building looks like rather than for what a projection is. Naming that honestly is most of what this essay adds: the convention is not a compromise between two general goods, it is an optimisation of one specific line family with a defensible parameter attached.

Six flat pictures, and what happens where two of them meetEach face is a flat picture at 90°, so a straight line inside one is drawn exactly straight — 1e-15 of its chord. Across a seam the two straight pieces meet at 1.80°. The shading is the area scale, which runs from 1 at a face's centre to 5.196 at its corner, with an anisotropy of 1.7321 there.leftfrontrightbackupdownacross the left/front seam: 1.80°, with each side straight to 7e-16corner area ×5.196anisotropy √3 = 1.7321 there
Fig. 11 The third answer, drawn. Straightness inside each face is exact and the join is a kink of 1.80° — a failure of a different kind from bending, and one no continuous surface has.
Five great circles, imaged on the stereographicEach is fitted as a general conic and comes back a circle: |A−C|+|B| is 1e-9 of the fit's own scale. Stereographic is the only surface here that does this.fitted conic: a circle to 1e-9stereographicdashed: the fit, not the samples
Fig. 12 And the first. The images of straight lines are circles to 1e-9, which is what makes the compass recipe exact and what the Panini family gives up in exchange for its verticals.
Seven identical spheres across a 84° frameThe outer sphere images 27% wider than the central one. That is what a correct rectilinear projection does, and it vanishes if the picture is viewed from 9 cm.54 px69 px84° across27% wider at the edge
Fig. 13 The complaint every one of these is a response to. A wide flat picture stretches the shapes at its edges, and the stretch is the plane doing exactly what a plane does rather than a fault to be corrected.

The short version

The projection most wide architectural pictures are made on is one member of a one-parameter family running from the flat plane through a compromise toward an orthographic azimuth. Every member draws a vertical world line as a vertical straight line, to the arithmetic floor. Only the member at zero — the plane — draws a general line straight, and the bend grows monotonically with the parameter.

The worst angular error over the field does not grow monotonically: it has an interior minimum, at d=1.04d = 1.04 over a 130° field, and the conventional value of 1 sits within four per cent of it. The worst anisotropy has its own minimum at 0.98, so the two criteria do not agree exactly.

That is a defence of the convention, and it is a better one than the usual argument, which names an exact property of half the map and says nothing about the other half.

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.

AnisotropyArea scaleConformalCylindrical projectionDemonstrationfield of viewFree parameterMarginal distortionPanini projectionPicture surfaceRectilinear projectionStereographic projectionStraight familyTaught and unmeasuredvertical vanishing point