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 −R dy/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.

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. 2 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. 3 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 detail advantage is not the frame count

The trade is stated above as detail against a centre of projection, and it is worth putting the detail side in numbers, because the obvious arithmetic gives the wrong answer.

The obvious arithmetic is that six frames give six sensors’ worth of samples against the swing lens’s one strip of film, so the stitch wins by six. It does not. Hold the lens fixed — the same focal length ff, the same detector pitch — and a swing lens whose film is at radius R=fR = f records 2πf/p2\pi f/p samples round the turn, while nn frames each 2ftan⁡(π/n)2f\tan(\pi/n) wide record 2nftan⁡(π/n)/p2nf\tan(\pi/n)/p. The ratio is

ntan⁡(π/n)π  =  1+π23n2+…,\frac{n\tan(\pi/n)}{\pi} \;=\; 1 + \frac{\pi^{2}}{3n^{2}} + \dots,

which is 1.10 at six frames and 1.27 at four — and tends to one as the frames narrow. At equal focal length the stitch buys essentially nothing, because both instruments are laying the same angular resolution round the same turn and all the stitch adds is the difference between a chord and its arc.

Where the advantage actually comes from is that the stitch is free to use a longer lens. Covering the turn in nn frames from a detector WW wide needs f=(W/2)/tan⁡(π/n)f = (W/2)/\tan(\pi/n), so the sample count is nW/pnW/p — linear in the frame count, against the swing lens’s fixed 2πfswing/p2\pi f_{\text{swing}}/p. For a 36 mm frame against a 25 mm swing lens the ratio is nW/2πfswing=0.23nnW/2\pi f_{\text{swing}} = 0.23n: 1.4 at six frames, 4.6 at twenty, 11.5 at fifty.

That reframes the whole trade, because the longer lens is also what fixes the parallax. A longer lens means a shorter frame, so βmax⁡\beta_{\max} falls and with it the floor no frame count could reach; and more frames means less azimuth per strip, so the horizontal half falls too. Detail, the seam and the floor all improve together, linearly, with the same change. There is no tension between them at all.

What is left is the two things that do not improve. The pivot error ee multiplies both parallax terms and is unaffected by any of this — it is hardware, and it is the only thing the photographer has to get right rather than merely spend patience on. And the exposure interval grows: nn frames take nn times as long, so the tear a moving subject leaves grows in exact proportion to everything else improving.

So the honest statement of the trade is not detail against a centre of projection. It is detail, resolution and parallax on one side, all bought together by shooting more frames, against the length of time the photograph takes — and a swing lens is the instrument that takes the whole turn in one eighth of a second and accepts the resolution its own focal length allows.

Which is why the two instruments have never competed. They sit at opposite ends of one axis — time — and every other quantity in the comparison is a consequence of where on that axis a photographer is willing to stand.

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. 4 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.

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. 5 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. 6 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 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. 7 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.

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. 8 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.

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