Surfaces that are not flat

The camera that is a cylinder

A swing-lens camera turns its lens about its own entrance pupil and sweeps a slit across film bent into a circle concentric with it. Compute where the light lands, unroll the film, undo the pinhole's inversion, and the result is not similar to the cylindrical picture surface — it is the same map, to the arithmetic floor. What it pays instead is detail, and a shear on anything that moves.

Worth reading first: The pivot that is not the eye · The cylinder, and the price of going all the way round · What a 360-degree photograph actually is.

This collection’s picture surfaces are defined as maps and nothing else. The cylinder is one of them: a map from a direction to a mark, in which the horizontal coordinate is the azimuth and the vertical one is the elevation’s tangent — and the essay about it measures what that costs — every vertical stays vertical, every horizontal bows, and the elevation stretches by the secant.

That definition has never been shown an instrument. It takes a direction and returns a mark, in the same way the machinery that recovers a camera is only ever shown a picture, and the separation is deliberate: a surface that knew about a camera could be quietly fitted to one.

So there is a claim available that has never been made. A swing-lens camera — the kind that turns its lens through a wide arc and sweeps a slit across film bent into a circle — is usually described as making a cylindrical picture. Is it one?

A swing-lens camera is the cylinder, exactlyThe instrument in plan: the entrance pupil at the centre, film bent into a circle of radius R about it, and a slit that sweeps with the lens. A ray from a subject at 34° of azimuth passes through the pupil and strikes the film half a turn away, at the marked point. Unrolling the film and undoing the pinhole's inversion gives a mark at azimuth 0.593412 in units of R — and lib/surfaces.js's cylinder, which is defined from a direction and has never been shown an instrument, puts it at 0.593412. The two agree to 1.1e-16 of a focal length over 861 directions, so this camera does not approximate a named picture surface; it is one.the pupil, and the pivotsubject at 34°the filmcorrect from 15 cm, at 160 mm wideagrees with the cylinder to 1.1e-16
Fig. 1 The instrument, in plan. A ray from a subject passes through the pupil at the centre and strikes film at radius R on the far side, inverted. Unroll the film, undo the inversion, and compare the mark with what the cylinder’s own definition says.

Two routes, and they are the same map

The instrument route is a piece of ray tracing with no surface in it. The pupil is at the origin. A ray arriving from direction d^\hat d continues through and strikes the film where the line t(d^)t(-\hat d) crosses the cylinder of radius RR; that happens at t=R/dx2+dz2t = R / \sqrt{d_x^2 + d_z^2}, so the strike is at height Rdy/dx2+dz2-R\,d_y/\sqrt{d_x^2 + d_z^2} and at an azimuth half a turn from the subject’s. Unroll the film, subtract the half turn, and negate the height because a pinhole inverts.

The surface route is the cylinder’s own definition, which is two lines of arithmetic and has no camera in it at all.

They agree to the arithmetic floor over eight hundred and sixty-one directions spanning a hundred and sixty degrees of azimuth and seventy of elevation. Not similar; the same function, arrived at from a machine and from a definition.

One room at 140° 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%140° across in every panelsame scene, same angle, six surfaces
Fig. 2 The cylinder as one of six picture surfaces, all drawn at the same angular width. It is a member of a family that was defined without reference to any instrument, and one of the six has a camera that makes it exactly.

That is worth having for a reason beyond tidiness. This site’s whole apparatus is computed rather than constructed, and the risk of a computed surface library is that it becomes a taxonomy: six maps, each with properties, none of them tied to anything anybody builds. Finding that one of the six is a real camera’s picture, exactly, is what turns the taxonomy into a claim about the world.

Which cylinder, and why the film has to be concentric

The instrument only works because of a condition that is easy to miss: the film is a circular arc about the pupil. Bend it about anything else and the result is a different surface.

That is the same condition the previous two rungs are about, wearing a different hat. There, the pivot had to be the pupil or the rays missed each other; here, the film’s centre has to be the pupil or the marks land in the wrong places. Both are the statement that a picture is a projection from a point and the point has to be the point.

A panorama pivoted 0 mm behind its own pupilLooking down on 6 frames taken by turning a camera about a point 0 mm from where the light actually crosses. The small circle is the path the entrance pupil takes; the heavy rays are each frame's own axis and they pass through the pivot exactly; the lighter rays are the edges of the strip each frame contributes, and they miss it by e·sin γ — 0.0 mm at 30.0° off axis. Every ray the stitch uses is tangent to a circle of that radius, drawn here, so the picture has a radius where a projection would have a point. The rays of the whole strip, top of frame to bottom, miss their own least-squares centre by 0.00 mm.the pivottangent circle, 0.0 mmthe rays meet at the pivot, exactlywhich is what a pivot on the pupil buys
Fig. 3 The condition, from the other rung. With the pivot at the entrance pupil the rays meet exactly, which is what a swing-lens camera achieves by turning the lens rather than the body.

The engineering is straightforward and old. The lens rotates on a bearing whose axis passes through its entrance pupil; the film is held in a curved gate at the focal distance; a slit rotates with the lens so that only the strip currently in front of it is exposed. Every one of those is a mechanism for enforcing the same geometric condition, and the resulting picture has a centre of projection in a way that a stitch of six frames does not.

Notice what the slit is doing. It is the narrow strip the first rung of this ladder takes as a limit, built as a piece of hardware — so the instrument realises in brass what the other arrangement only approaches by shooting more. That is the usual relation between a limit and a machine, and it is worth saying because the limit was found first and the machine is a century older than the finding.

What it costs, one: detail

The swing lens records the whole turn on one strip of film. Its resolution round the turn is the film’s resolution multiplied by the film’s own length, which is 2πR2\pi R for a full circle — and RR is the focal length, a couple of centimetres.

A stitched camera records each frame separately and gets the whole sensor for each frame’s share of the turn. Six frames is six times the sensor, spread over the same three hundred and sixty degrees.

Neither instrument is exact, and they are inexact in different thingsSix numbers on one arrangement: a 6-frame stitch with the pivot 60 mm off the pupil against a swing-lens camera, both delivering the same panorama, with a subject 1.4 m/s at 3 m. The swing lens has no parallax — exactly none, because it turns about its own pupil — and pays for it twice: 2.08 times less detail round the turn, and a 32 px shear on anything that moves, because its two ends are exposed a moment apart. The stitched camera's own motion failure is 956 px and is a different shape: a tear at the seam rather than a bend, because its frames are seconds apart rather than continuous. A shear is a picture of a distorted subject; a tear is a picture of no subject.stitched · parallax at the seam26swing lens · parallax0stitched · detail, px per degree100swing lens · detail, px per degree48stitched · a moving subject, torn1410swing lens · a moving subject, sheared686 frames · pivot 60 mm offdetail ratio 2.08×
Fig. 4 Six numbers on one arrangement. The exact instrument’s parallax is zero and its detail is the smaller, and its failure on a moving subject is a different shape from the stitched camera’s.

This is the trade, and it is a real one rather than a rhetorical one: the stitched camera buys detail with its centre of projection. Where the offset error comes from is not a flaw in the design, it is a consequence of the design being a way to get many frames’ worth of resolution out of one lens.

There is a version of the trade that does not involve any error at all. Stitch six frames from a camera on a correct rail, and the resolution is bought for nothing but time. That is the arrangement panoramic photographers actually use, and this site’s contribution is the exact statement of what happens when the rail is wrong rather than the observation that it can be right.

The same lens behind five sensorsA 24 mm lens subtends 73.7° across full frame and 18.0° across a phone sensor. The focal length is the same in every one of these; what changes is the rectangle behind it. Two setups matched on angle rather than on focal length are correct from the same distance — 222 mm for a 160 mm print — whatever their formats.full frame · 73.7°APS-C · 52.4°Micro Four Thirds · 39.6°1 inch · 30.8°phone (1/1.7″) · 18.0°one 24 mm lens · the angle is a property of the rectangle behind itMicro Four Thirds: 2.00× diagonal, 2.08× wide, 1.85× tall24 mm across five formats73.7° down to 18.0°
Fig. 5 Where the frames’ detail comes from, which is a focal length and a sensor of a stated width — the same two numbers that set the vertical parallax floor.

What it costs, two: a subject that moves

A swing-lens camera makes its picture over an interval. The lens sweeps; the slit follows; the two ends of one photograph are exposed a fraction of a second apart.

So a subject moving across the view is drawn sheared — continuously, with no break, because the exposure is continuous. A person walking through a swing-lens panorama comes out stretched or compressed depending on which way they walked relative to the sweep.

A stitched panorama fails differently. Each frame is exposed at one instant and the instants are seconds apart, so the same person is drawn torn: a jump at the seam, of the whole distance they travelled between frames. The familiar artefact of a person appearing twice in a stitched panorama, or with half a body, is this.

Neither instrument is exact, and they are inexact in different thingsSix numbers on one arrangement: a 6-frame stitch with the pivot 60 mm off the pupil against a swing-lens camera, both delivering the same panorama, with a subject 3.4 m/s at 3 m. The swing lens has no parallax — exactly none, because it turns about its own pupil — and pays for it twice: 2.08 times less detail round the turn, and a 77 px shear on anything that moves, because its two ends are exposed a moment apart. The stitched camera's own motion failure is 1471 px and is a different shape: a tear at the seam rather than a bend, because its frames are seconds apart rather than continuous. A shear is a picture of a distorted subject; a tear is a picture of no subject.stitched · parallax at the seam26swing lens · parallax0stitched · detail, px per degree100swing lens · detail, px per degree48stitched · a moving subject, torn1471swing lens · a moving subject, sheared776 frames · pivot 60 mm offdetail ratio 2.08×
Fig. 6 A faster subject. Both costs rise together and the ratio between them does not, because both are a distance travelled divided by a distance away.

Which is larger is a question with a boring answer — the tear, by a large factor, because seconds are longer than eighths of a second. The interesting statement is that they are different kinds of failure:

A shear is a picture of a distorted subject. There is a solid in the world whose projection from this eye is what was recorded; it is not the subject’s shape, but it is a shape, and everything about the picture is consistent.

A tear is a picture of no subject at all. There is no arrangement of matter whose image has a person’s left half at one place and their right half thirty centimetres away with a stripe of background between.

That distinction is this site’s own, and it arrives here for the fifth time. A two-centre picture is a one-centre picture of a sheared room, so it is a picture of something; a divergent construction is a correct picture of a leaning plane. A tear is where that move fails, and it fails because a discontinuity cannot be absorbed by a map of space.

Every row is a different camera, so a vertical is not verticalThree vertical poles at 6 m, imaged by a shutter that takes 33.3 ms to read its 300 rows while the camera crosses at 4.0 m/s. The pale lines are where a global shutter would draw them. The lean is 1.403° and the closed form — image speed × readout ÷ frame height — says 1.406°.0.0 ms8.3 ms16.7 ms25.0 ms33.3 mslean 1.403° drawn against 1.406° predicted · a still world leans 0.000°no single viewpoint — the rays miss by 33.3 ms of travelthe frame is a stack of projections indexed by row
Fig. 7 The nearest relative, from the sensor field: a frame whose rows are read at different instants. A rolling shutter’s failure is a shear too, and for the same reason — the readout is continuous.
One exposure, three depths, three lengthsThree points moving at 6 m/s across the frame at 3, 6 and 12 m, over an exposure of 500.0 ms. The streaks are straight — the image of a straight path is a straight segment — and their lengths are 264, 193, 125 px, in the ratio of the depths reversed. There is no single kernel that blurs all three.3 m · 264 px6 m · 193 px12 m · 125 pxnear ÷ far = 2.123 against a depth ratio of 2.123exposure 500.0 ms · 6 m/s across the frameeach streak is straight; the set of them is not one kernel
Fig. 8 And the case where the interval is short and the subject is fast, which is neither shear nor tear but a streak whose shape depends on depth.

Neither instrument is exact, and the variables are different

Put the two side by side and neither of them has nothing wrong with it.

The swing lens has no parallax. Not small: zero, because the two routes above agree at the arithmetic floor and there is no offset in the arrangement to make a miss out of. It pays in resolution and in a shear.

The stitched camera has essentially no motion problem within a frame — a thousandth of a second is not an interval — and pays in a miss that is esinγe \sin \gamma and a tear between frames.

Neither instrument is exact, and they are inexact in different thingsSix numbers on one arrangement: a 6-frame stitch with the pivot 60 mm off the pupil against a swing-lens camera, both delivering the same panorama, with a subject 0.0 m/s at 3 m. The swing lens has no parallax — exactly none, because it turns about its own pupil — and pays for it twice: 2.08 times less detail round the turn, and a 0 px shear on anything that moves, because its two ends are exposed a moment apart. The stitched camera's own motion failure is 0 px and is a different shape: a tear at the seam rather than a bend, because its frames are seconds apart rather than continuous. A shear is a picture of a distorted subject; a tear is a picture of no subject.stitched · parallax at the seam26swing lens · parallax0stitched · detail, px per degree100swing lens · detail, px per degree48stitched · a moving subject, torn0swing lens · a moving subject, sheared06 frames · pivot 60 mm offdetail ratio 2.08×
Fig. 9 The control, at the far end of the slider: with nothing moving, neither instrument pays anything for time, and the comparison collapses to the two rows about space and detail.

The control matters here more than usual. assertNoInstrumentIsExactInBoth asserts a ratio between the two motion costs, and at a stationary subject both of them are zero — so the assertion is made conditional on something moving, and the still case asserts instead that both are exactly nothing. A version that asserted the ratio unconditionally would have failed at the one setting where the two instruments genuinely agree, which is the setting the comparison starts from.

The instrument as an argument about surfaces

There is a reading of all this that goes beyond photography and is why the essay sits in this field rather than in sensor.

The curved field’s premise is that a picture surface is a choice — that a flat plane is one option among six, that none of them keeps everything, and that calling the fisheye the distorted one is a habit rather than a measurement. The obvious objection is that the flat plane is the one a camera makes, so the choice is not really open.

The swing-lens camera is the counterexample, and it is a hundred and twenty years old. It is a camera; it makes a cylindrical picture; the cylindrical picture is exactly the surface the library defines. A photographer choosing between it and an ordinary camera is choosing a picture surface with a purchase rather than with a slider.

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 120° fanlower left would be a surface with no cost
Fig. 10 Where the cylinder sits among the six on the two properties a surface can have. The choice this instrument makes is a point on this plot, and it is not the origin.
The same 110° view, projected onto a plane and onto a cylinderOn the plane every straight line stays straight (1e-13 px of bend) and the edges stretch; on the cylinder the stretch is even and straight lines bow by up to 544 px.flat picture plane — straight lines stay straightcylindrical picture surface — even stretch, bowed linesone scene, two picture surfacesneither is the distorted one
Fig. 11 And the pair the field opened with: a flat picture and a curved one of the same scene at the same width. Neither is the distorted one, and one of them has a camera.

The same argument runs one more step. The screen a picture is shown on is a second surface, and it is increasingly not flat either — so a picture can now be made on a cylinder and shown on one, and whether those two cylinders are the same cylinder is a question with an answer.

What a reader can check without a swing-lens camera

Almost nobody has one of these, and the claim can still be checked from the other end.

Take a spherical panorama — a file from a consumer camera, or one stitched from frames — and cut a cylindrical view out of it. The equirectangular format is a lookup table of directions, so cutting a cylindrical view is a re-projection with no image data in it: azimuth across, tangent of elevation down. The result is what a swing-lens camera would have recorded, and the two agree exactly, because both are the same map applied to the same directions.

What does not agree is the parallax. A view cut from a stitched file inherits the stitch’s defects — the ghost at the seams, the vertical floor, whatever the pivot error was — and a swing-lens negative does not have them to inherit. So the re-projection reproduces the surface and not the instrument, which is the distinction this essay is about, and it is the reason “the file is cylindrical” and “the picture is a cylindrical projection” are two different sentences.

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. 12 The same directions re-projected another way entirely, which is a map from picture coordinates to picture coordinates with no image data anywhere in it. Nothing about the instrument survives the operation and nothing about the instrument’s parallax is removed by it.

Why the film’s inversion has to be in the arithmetic

A detail in the instrument route is worth pulling out, because leaving it out would have produced a plausible wrong answer rather than an error.

A pinhole inverts: the image on the film is upside down and back to front. The strike point is at Rd^-R\hat d rather than +Rd^+R\hat d, so its azimuth is half a turn from the subject’s and its height is the negative.

Undo both and the map is the cylinder’s. Undo neither and the map is the cylinder’s composed with a half-turn, which is also a perfectly good picture surface — it is the same surface read upside down — and every property the field measures would come out identical. Straightness, conformality, area scale: all invariant under a rotation of the picture.

So a version of this that forgot the inversion would have agreed with the cylinder on every measured property and disagreed with it mark for mark, and only a comparison of the marks would have caught it. That is what assertTheSwingLensIsTheCylinder compares, and it is the reason it compares coordinates rather than statistics.

Five great circles, imaged on the stereographicEach is fitted as a general conic and comes back a circle: |A−C|+|B| is 7e-10 of the fit's own scale. Stereographic is the only surface here that does this.fitted conic: a circle to 7e-10stereographicdashed: the fit, not the samples
Fig. 13 The kind of property that would not have noticed: how a great circle images on the surface, which is a shape and is unchanged by turning the picture over.

What this does not claim

It does not claim the swing lens is better. It has no parallax and less detail, and a photographer with a rail and a still subject should stitch.

It does not claim every panoramic camera is a cylinder. A rotating camera with a flat sensor and no slit is a stitching machine with the stitching done in hardware, and its picture surface is a sequence of planes rather than an arc — which is the plane’s own behaviour repeated, not a curve.

It does not claim the sweep is the only interval in the arrangement. The film has a sensitivity and the slit has a width, so a swing-lens exposure is an interval twice over, and a frame being an interval is the sensor field’s subject rather than this one’s.

And it does not claim the cylinder is a good surface. It bows every horizontal, it stretches elevation by the secant, and it shares that stretch exactly with the equirectangular rectangle — which is the field’s own finding and is unaffected by there being a camera that makes it.

An instrument realises a surface exactly or it does not, and the way to find out is to compute where the light lands and compare the marks. Comparing properties compares what has already been abstracted, and two different pictures can have identical properties.

One half falls away and the other does not moveThe worst miss across the seam and the worst miss at the top of the frame, against the number of frames, for a pivot 60 mm off the pupil and a frame 38° tall. The first is e·sin(π/n) and falls from 60.0 mm to 2.9 mm; the second is e·sin(β) and is 19.53 mm at every count, bit for bit. They cross at π/β = 9.47, so past 10 frames every remaining pixel of parallax is vertical and no further shooting touches it. The upper curve is the corner of the strip, which is what a reader actually gets.0204060204060frames in the panoramadistance from the pivot (mm)π/β = 9.5across the seamup the framepivot 60 mm · frame 38° tallfloor 19.53 mm
Fig. 14 The rung this one answers. Both halves of the stitched camera’s parallax are zero for the swing lens, which is what makes the comparison a trade rather than a ranking.
One room at 300° 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 cannot hold this field of view at all; the five curved surfaces bend the ground lines by 3.5% to 6.0% of their own length.no picture at 300°the plane is unbounded at 180°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%300° across in every panelsame scene, same angle, six surfaces
Fig. 15 And the surface itself at three hundred degrees across, where five of the six hold the room without difficulty and the flat plane refuses. That is where the field started and it is unchanged by the arrival of a camera that makes one of the five.
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 pointequirect.one parameter · parallelno meeting point2 of 3 keep a curvethe signature has three values, not eight
Fig. 16 The surface’s own signature, which this camera inherits exactly: the family of world lines it draws straight, which for a cylinder is the verticals and the horizon.
The ghost falls as one over the distance, which is what parallax doesThe seam's doubling in pixels of a 8,000-pixel panorama stitched from 6 frames, against how far away the object is, with the pivot 60 mm off the pupil. At 0.8 m it is 102 px and at 32 m it is 2.4 px. The second curve is the product of the two, which stays inside a factor of 1.067 across a forty-fold change of distance — and that flatness is the whole diagnosis. A misregistration that did not fall off with distance would be a calibration error; one that falls as 1/D is two eyes in different places.025507510000.50011.50distance to the object being stitched (log₁₀ metres)ghost (px), and ghost × distance ÷ 4ghost × distance6 frames · pivot 60 mm offproduct flat to 1.067
Fig. 17 And the defect it does not have. A stitched panorama’s seam doubles anything near it by an amount that falls as one over the distance; a swing-lens negative has no seam to double at.

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.

centre of projectionCylindrical projectionDemonstrationEntrance pupilExposure intervalinstrument limitPanoramaParallaxPicture surfaceResolution