What survives

The ball at the edge of the frame

A ball photographed near the edge of a wide picture is not drawn as a circle. It is an ellipse, longer along the radius from the centre of the picture than across it, and the centre of that ellipse is not the image of the centre of the ball. Both are properties of the flat sheet the picture is on, and an exact pinhole produces both.

Worth reading first: The circle whose centre moves · The conic a circle becomes · What a projection destroys.

A billiard ball is on a table and a camera photographs the whole table at once. In the middle of the picture the ball is drawn as a circle. At the edge it is not.

That much is easy to check and it is usually blamed on the lens. It is not the lens. The camera here is an exact pinhole with no glass in it anywhere, every point of every figure is projected through one centre, and the ball at the edge still comes out as an ellipse.

Five equal balls, equally far awayEvery ball here is 0.40 m across the radius and 4.60 m from the eye, so the arrangement singles out no one of them. On the axis the outline is a circle to 2.7e-15 of its own width; at 42.4° off it is an ellipse 1.358 times longer along the radius from the centre of the picture than across it, and its centre is 4.28 px from the image of the ball's own centre — 8.0% of the outline's own semi-axis. The outline is computed as C = adj(P adj(Q) Pᵀ), three matrix products, and drawn from that rather than traced.correct from 8 cm, at 160 mm widestretch 1.358 · centres 4.28 px
Fig. 1 Five balls of the same radius, all of them the same distance from the eye, arranged on a circle about it so that the arrangement singles out none of them. The outlines are computed from the balls and drawn; nothing was traced off a silhouette.

The site has been near this before and stopped one step short. Wide angle is not distortion measures how much wider a sphere is drawn at the edge of a wide frame, and answers the oldest complaint about wide-angle photographs by pointing at the reader’s own position. That is a claim about size.

This is a claim about shape, and about a second thing that turns out to be there when the shape is computed rather than assumed.

What a sphere’s outline actually is

Start with the object rather than the picture.

A sphere is a quadric — a surface whose points satisfy one quadratic equation, written as a symmetric four-by-four matrix in homogeneous world coordinates, exactly as a conic is a symmetric three-by-three in homogeneous picture coordinates. A cone, a cylinder, an ellipsoid and a hyperboloid are the same kind of object with different entries.

The outline of a quadric, seen from a point, is made of the rays that graze it — the rays whose line touches the surface rather than cutting it. Where those rays touch, they trace a curve on the surface, and that curve is the thing whose image is the outline.

The eye's polar plane cuts a sphereThe curve on the surface whose tangent plane passes through the eye — the contour generator — is exactly where the surface meets the polar plane of the eye, Q x. Here it is drawn as a plane and a curve rather than as a silhouette traced in the picture. Every point of it projects onto the conic the duals predict, to 1.5e-20 of the conic's own scale, over 242 points.correct from 18 cm, at 160 mm wideoutline from the duals · ellipse
Fig. 2 The curve on the surface, and the plane it lives in. The eye’s polar plane with respect to the quadric contains every point whose tangent plane passes through the eye, so the curve is a plane section — and a plane section of a quadric is a conic.

That is the whole of it: the grazing curve is a plane section, a plane section of a quadric is a conic, and the image of a conic is a conic. So the outline of a sphere is a conic, always, and the only question is which one.

The circle on the ball is not the ball’s equator. It is the circle at which the ball turns away, and its plane is nearer the eye than the centre is. That circle is the same object the edge of a shadow is drawn on the object computes for a lamp, arrived at here for an eye, and the two agree on the case they share.

The one line of algebra

Computing the outline point by point is honest and slow. There is a route with no sampling in it, and it is worth stating because it is what turns “the outline is a conic” from a description into an instrument.

Write the sphere as the four-by-four matrix QQ, the camera as the three-by-four matrix PP, and take the duals of both. A dual quadric is the set of planes tangent to the surface; a dual conic is the set of lines tangent to the curve. Then

C∗=P Q∗ PTC^{*} = P\,Q^{*}\,P^{\mathsf T}

and the outline conic is the adjugate of that. Three matrix products, no geometry, no case distinction between a ball, a pipe, a cone and a dish.

The reason the duals are the right objects is the reason the outline is made of tangent rays rather than of chosen points: what the eye sees of a solid is which planes graze it, and a dual quadric is exactly a list of those.

The one-line formula and the traced curve, over a decade of distanceC = adj(P adj(Q) Pᵀ) against the contour generator traced on the surface and projected point by point, for a sphere and an ellipsoid, with the eye taken from 2.1 m out to 34 m. The two routes agree to at least 19 decimal places everywhere and the curve is flat, which is what an identity looks like rather than an approximation. The cone and the cylinder are not on this plot because the dual route has nothing to compare: its outline conic comes back rank 1, and the adjugate that would take the point conic back out of it is 1.4e-9 of the matrix's own size.1919.52020.5102030distance from the eye to the surface (m)decimal places the two routes agree tosphereellipsoidworst 19 placessingular quadrics have no dual conic
Fig. 3 The two routes against each other, with the eye taken from two metres out to thirty-four. The traced curve lands on the conic the duals predict to nineteen decimal places everywhere, and the curve is flat — which is what an identity looks like rather than an approximation.

Which conic, and where

Now the picture. On the axis, the outline is a circle exactly. Off the axis it is an ellipse, longer along the radius from the centre of the picture than across it, and the elongation grows with the angle.

A ball 36 degrees off the axisOne ball of radius 0.40 m, 4.60 m from the eye, carried across the picture on a circle about the eye so that its distance never changes. At 36.5° off the axis its outline is 1.246 times longer along the radius from the centre of the picture than across it, and the centre of that outline is 2.91 px from the image of the ball's own centre — 6.5% of the outline's own semi-axis. Both numbers are zero on the axis and neither is a lens: the outline is computed as C = adj(P adj(Q) Pᵀ) from an exact pinhole.2.91 px apartcorrect from 8 cm, at 160 mm widestretch 1.246 · centres 2.91 px
Fig. 4 One ball, carried across the picture on a circle about the eye so that its distance never changes. At thirty-six degrees off the axis its outline is a quarter longer radially than it is across.

The direction of the elongation is worth stating because it is the opposite of what a lens fault would give. A radial stretch is what a flat picture surface does: the picture plane is further from the eye at the edge than at the centre, and a solid subtending a fixed angle covers more of the sheet the more obliquely the sheet is met. It is edge stretch again, applied to a shape rather than to a size, and it is correct from the station point in exactly the same way.

The second thing, which is the one nobody expects

The centre of the drawn ellipse is not the image of the centre of the ball.

A ball 42 degrees off the axisOne ball of radius 0.40 m, 4.60 m from the eye, carried across the picture on a circle about the eye so that its distance never changes. At 42.4° off the axis its outline is 1.358 times longer along the radius from the centre of the picture than across it, and the centre of that outline is 4.28 px from the image of the ball's own centre — 8.0% of the outline's own semi-axis. Both numbers are zero on the axis and neither is a lens: the outline is computed as C = adj(P adj(Q) Pᵀ) from an exact pinhole.correct from 8 cm, at 160 mm widestretch 1.358 · centres 4.28 px
Fig. 5 The two marks in the middle of the outline. One is where the ball’s own centre lands; the other is the centre of the ellipse drawn round it. Off the axis they are different points.

The reason is short and it is a reason this site has already met. The centre of a conic is defined by midpoints — it is the point every chord’s midpoint arrangement is symmetric about — and a projection does not preserve midpoints. The near half of the grazing circle is magnified more than the far half, so the drawn figure is not symmetric about the image of the point the real figure was symmetric about.

Measured, on the ball at the edge of a ninety-two degree frame: the two centres are a few pixels apart, which is a few per cent of the outline’s own semi-axis. That is small and it is not nothing, and it matters in exactly one situation — when somebody is measuring a ball’s position by finding the centre of its drawn outline, which is the ordinary way to do it.

Five equal balls, equally far awayEvery ball here is 0.40 m across the radius and 4.60 m from the eye, so the arrangement singles out no one of them. On the axis the outline is a circle to 1.8e-14 of its own width; at 42.4° off it is an ellipse 1.358 times longer along the radius from the centre of the picture than across it, and its centre is 3.22 px from the image of the ball's own centre — 8.0% of the outline's own semi-axis. The outline is computed as C = adj(P adj(Q) Pᵀ), three matrix products, and drawn from that rather than traced.correct from 6 cm, at 160 mm widestretch 1.358 · centres 3.22 px
Fig. 6 A wider frame. Both effects grow, and the ball nearest the edge is the one a person would most want to measure and the one the measurement is worst on.

Both numbers have a closed form

The two effects were computed above from the dual quadric, three matrix products and no assumptions. They can also be written down, and the written form is short enough to carry and sharp enough to argue with.

Let α\alpha be the ball’s angular radius, sin⁡α=R/d\sin\alpha = R/d, and let θ\theta be the angle off the optical axis. The grazing rays form a cone of half-angle α\alpha about the direction to the ball, and the outline is that cone cut by the picture plane. Writing the cone as (p⋅u^)2=∣p∣2cos⁡2α(\mathbf{p}\cdot\hat{u})^{2} = |\mathbf{p}|^{2}\cos^{2}\alpha and intersecting with z=fz = f gives a conic whose axes complete the square in one line:

a=fcos⁡αsin⁡αcos⁡2α−sin⁡2θ,b=fsin⁡αcos⁡2α−sin⁡2θ.a = \frac{f\cos\alpha\sin\alpha}{\cos^{2}\alpha - \sin^{2}\theta}, \qquad b = \frac{f\sin\alpha}{\sqrt{\cos^{2}\alpha - \sin^{2}\theta}}.

So the elongation is

ab=cos⁡αcos⁡2α−sin⁡2θ  ⟶  sec⁡θ\frac{a}{b} = \frac{\cos\alpha}{\sqrt{\cos^{2}\alpha - \sin^{2}\theta}} \;\longrightarrow\; \sec\theta

as the ball shrinks. That limit is the whole first effect: a small ball at θ\theta off the axis is drawn sec⁡θ\sec\theta times longer radially than across, and the ball’s size does not appear. Checked against the generator’s own outlines — computed the other way, from C∗=P Q∗PTC^{*} = P\,Q^{*}P^{\mathsf{T}} — the exact expression agrees to six decimal places at every angle sampled, and sec⁡θ\sec\theta agrees to three.

The offset comes out of the same completed square. The ellipse’s centre sits at fsin⁡θcos⁡θ/(cos⁡2α−sin⁡2θ)f\sin\theta\cos\theta/(\cos^{2}\alpha-\sin^{2}\theta) while the image of the ball’s own centre sits at ftan⁡θf\tan\theta, and the difference, divided by the semi-axis aa, collapses to

offseta=tan⁡θ tan⁡α.\frac{\text{offset}}{a} = \tan\theta\,\tan\alpha.

A product of two tangents, one for where the ball is and one for how big it looks. It reproduces the measured fractions exactly: 0.01540.0154 at ten degrees, 0.03180.0318 at twenty, 0.07320.0732 at forty, against 0.015390.01539, 0.031770.03177 and 0.073240.07324 from the drawn conics.

That closed form settles something the earlier prose here had wrong. The elongation is a function of one angle and the offset is a function of two. A wide frame stretches every ball at the edge by the same factor whatever its size, and displaces the big near one much further than the small far one — so the error in a position measured from an outline’s centre depends on the target’s apparent size, and cannot be quoted per field angle alone. That is the same distinction a wrong match is not a small error draws between a residual that scales with the measurement and one that does not.

How big the two effects are, in the pictures people take

At ten degrees off the axis — which is most of an ordinary picture — the elongation is about one part in sixty-five and the two centres are half a pixel apart on a canvas this wide. Nothing whatever follows. At twenty degrees the elongation is a sixteenth. At forty it is not far off a third, and the gap between the centres has reached a fourteenth of the outline’s own semi-axis, which on a ball drawn thirty pixels across is a pixel. Those are the numbers the closed form gives and the drawn conics confirm, and they are larger than the ones a quick estimate suggests, which is the awkward direction for an error in a correction to run.

Those are the angles a wide lens reaches in the corners of an ordinary frame, so the effect is not exotic. What makes it invisible is that a person looking at the picture is almost never looking for a circle: the ball is drawn among other things that the same surface is stretching by the same amount, and a scene stretched consistently reads as a scene.

The measurement is a different matter. A ball fitted to its own drawn outline and reported by that outline’s centre is being reported at a position that is systematically outward — away from the centre of the picture, always, never toward it — by an amount that grows with the field angle. A bias with a sign is worth more attention than a scatter of the same size, because averaging removes the second and not the first.

Both of them grow with the angle, and neither is the lensThe elongation of a ball's outline and the gap between the centre of that outline and the image of the ball's centre, swept from the axis to 46.8° off it. At the edge the outline is 1.467 times longer radially than across, and the two centres are 9.30% of the semi-axis apart. Both are properties of a flat picture surface; the camera here is an exact pinhole with no lens in it at all.11.201.40010203040angle off the optical axis (degrees)stretch, and 1 + centre gap as a fraction of the semi-axisstretchcentre gapball of radius 0.40 mstretch to 1.467
Fig. 7 The two curves for a narrower frame. Both are still there and both are smaller, and the shape of the two curves does not change — they are the same functions of the angle off axis, sampled over a shorter range.

Where the ellipse stops being an ellipse

The denominator cos⁡2α−sin⁡2θ\cos^{2}\alpha - \sin^{2}\theta is doing more than scaling. It has a zero, and the zero is a statement about what a flat picture surface can and cannot hold.

It vanishes when cos⁡α=sin⁡θ\cos\alpha = \sin\theta, which is θ+α=90∘\theta + \alpha = 90^{\circ} — the field angle at which the ball’s own grazing cone becomes tangent to the plane through the eye parallel to the picture. One grazing ray then runs parallel to the picture surface and never lands, and the outline is a parabola. Push further and two rays escape and it is a hyperbola: an outline with branches, open at both ends, with no centre to offset and no semi-axis to be a fraction of.

So the conic type of a ball’s outline is settled by a single comparison, θ+α\theta + \alpha against a right angle, and it runs through all three types in the order a circle’s image runs through them — for the same reason in both cases, which is whether the curve on the surface reaches the plane the picture cannot represent.

For the balls here that threshold sits at 85.0∘85.0^{\circ} off the axis, since α\alpha is only five degrees, so it needs a frame of a hundred and seventy degrees to reach and no photograph has one. The threshold matters anyway, in two places. A near ball has a large α\alpha: hold one at two radii from the eye and α\alpha is thirty degrees, so the outline degenerates by sixty degrees off axis, which is inside a wide frame. And the formulas above have that zero in the denominator, so both effects grow without bound as it is approached — the elongation and the offset are not small corrections near the threshold, they are the whole shape of the thing.

That is the sharpest available statement of what the flat surface costs, and it is the reason no surface keeps everything is the right frame for the control below. A sphere has no threshold at all: every ball’s outline on it is a circle of angular radius α\alpha, at every field angle, with nothing in the denominator to vanish.

The control, and it is a different surface

Every claim above is about a flat picture surface. The test that says so is to change the surface and leave everything else alone.

On a sphere it is a circle wherever it isThe same ball drawn on a spherical picture surface instead of a flat one, carried from 1.4 m out to 11 m and across 68° of field as it goes. Its outline is out of round by at most 8.4e-13° of arc anywhere on that sweep, and its angular radius agrees with asin(R/d) to 9.9e-13°. Nothing about the ball changed between this figure and the last one: a sphere has no direction that is special and a flat sheet has an axis, and the stretch belongs to the surface.102030246810distance from the eye to the ball (m)angular radius of the outline (degrees)out of round by at most 6.2e-13°a spherical picture surfaceasin(R/d) to 6.1e-13°
Fig. 8 The same balls at the same field angles, drawn on a spherical picture surface. The outline is a circle wherever the ball is — out of round by four parts in ten thousand million million of a degree — and its angular radius is asin(R/d) exactly.

On a sphere, the outline of a ball is a circle, everywhere, because a sphere has no direction that is special and a flat sheet has an axis. Nothing about the ball has changed; the whole of the effect belongs to the choice of surface, which is this site’s standing position on almost everything in the curved field.

What it takes to get the ball back

A shape recovered from a picture is worth having only if the recovery is stated. Here it is short, and it is a good illustration of what a single view can and cannot do.

From the drawn conic and the camera’s own intrinsics, the tangent cone through the eye is recoverable exactly — it is the cone whose section by the picture plane is that conic. The direction to the ball is then the cone’s axis, and the half-angle of the cone gives the ratio of the ball’s radius to its distance. What is not recoverable is either one of those two separately, which is the single view’s usual refusal: one picture gives shape and never size.

That last difference is the one worth carrying. A photographed circle leaves a two-fold pose ambiguity and a free distance — two congruent circles in planes twenty-three degrees apart draw the same conic. A photographed sphere leaves only the distance, because a sphere is the same from every direction, so the only thing a picture of one can fail to say is how big it is.

There is a practical corollary that follows straight from that asymmetry, and it is why spheres are used as calibration targets and circles mostly are not. A photographed ball tells the truth about its direction and lies about nothing, once the conic has been fitted properly; a photographed circle has to be told which of its two poses it is in before it says anything at all. The ball’s one refusal — the scale — is the refusal every single view makes about everything, and the circle’s extra one belongs to the circle.

What this does not say

It says nothing about a lens. Real photographs of balls at the edge of a wide frame have both effects and a third one on top, and separating them needs the lens model that fitting a lens from straightness alone recovers. The pinhole’s share is the part computed here and it is the part that does not go away with better glass.

It says nothing about whether a viewer notices. The elongation is correct from the station point and a reader standing there sees a ball; a reader standing further back sees an elongated one, and whether that reads as wrong is a fact about seeing rather than about projection.

And it does not make the outline useless for measurement. It makes the outline’s centre the wrong thing to measure. The conic is five numbers and every one of them is available; fitting the conic and taking its tangent cone is exact, and taking its centre and calling that the ball is a small error that nothing in the picture announces.

The transferable form

Every statement this site has made about a conic in a plane has a partner about a quadric in space, and until this essay none of the partners had been made.

A curve in a plane and a surface in space are the same kind of object one dimension apart, so a result about one is a question about the other — and the question usually has an answer, in the same words.

The pole and polar of a conic becomes the pole and polar plane of a quadric. Five points fixing a conic becomes nine fixing a quadric. The circle whose centre moves becomes the ball whose centre moves. Each of those is a sentence this site had already written with one word changed, and the changed word is the whole of the work.

The one place the transfer stops is worth knowing about too, and it is the next rung: a singular quadric — a cone, a cylinder — has a dual that is rank one, and the one-line outline formula loses the answer entirely while the point-by-point route keeps it. Two routes agreeing is the site’s habit; two routes where one has a domain and the other does not is the more useful thing to know.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

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.

Camera matrixcentre of projectionConicContour generatorDemonstrationDual quadricEdge stretchfield of viewImaged circleMidpointPicture surfacePolar planeQuadric