What survives

Every quadric has one outline

The curve where a solid turns away from the eye is the section of the solid by one plane — the eye's polar plane — and the outline is three matrix products with no sampling in them. It works for a ball, a dish and a hyperboloid, and it fails for a cone, whose dual outline collapses to a single point and forgets which two lines pass through it.

Worth reading first: The ball at the edge of the frame · The polar with a straightedge · The circle whose centre moves.

Point a camera at a solid and the solid has an outline. Everything inside it is the solid; everything outside is not.

That sentence is doing more work than it looks. The outline is not an edge of the solid — a ball has no edges at all and still has an outline — and it is not painted on the surface, because it moves when the eye moves. It is a curve that belongs to the pair.

The eye's polar plane cuts an ellipsoidThe 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.2e-20 of the conic's own scale, over 242 points.correct from 18 cm, at 160 mm wideoutline from the duals · ellipse
Fig. 1 The curve, and the plane that contains it. Every point of that curve is a point of the surface whose tangent plane passes through the eye, and every one of them lies on one plane.

The claim of this essay is that for one whole class of solids the outline is not merely computable but is three matrix products, and that the class is large enough to be interesting and has an edge sharp enough to be instructive.

The class

A quadric is a surface whose points satisfy one quadratic equation. In homogeneous world coordinates that is a symmetric four-by-four matrix QQ with XTQX=0\mathbf{X}^{\mathsf T} Q \mathbf{X} = 0, exactly as a conic in the picture is a symmetric three-by-three with xTCx=0\mathbf{x}^{\mathsf T} C \mathbf{x} = 0.

The class is wider than it sounds. A sphere, every ellipsoid, both hyperboloids, a paraboloid, every circular and elliptic cylinder, and every cone are quadrics, and they differ only in the entries.

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 A ball. The section is an ellipse in its own plane and the outline is an ellipse in the picture.

The site already has the flat version of this whole apparatus. The polar with a straightedge takes the pole and polar of a conic, and five marks and the sixth fits one to five points. Everything below is one word changed: line for plane, conic for quadric, three for four.

The plane the eye cuts

The polar of a point with respect to a conic is CxC\mathbf{x}. The polar plane of a point with respect to a quadric is QXQ\mathbf{X}, and the same words describe what it is for: it collects the points whose tangent contains the given point.

For an eye outside the surface, that means the polar plane collects exactly the points where the surface turns away from the eye. The contour generator — the curve whose image is the outline — is therefore Q∩Q \cap the polar plane of the eye, and no search is involved.

The eye's polar plane cuts an ellipsoidThe 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 6.1e-21 of the conic's own scale, over 242 points.correct from 18 cm, at 160 mm wideoutline from the duals · ellipse
Fig. 3 The eye moved. The polar plane swings with it, and it never passes through the centre of the solid: it is always nearer the eye than the centre is, which is the same statement as more than half the ball being hidden.

Two consequences follow immediately and neither needs any more machinery.

A plane section of a quadric is a conic. That is what the quadratic form restricted to a plane says: two variables, degree two.

The image of a conic is a conic. A projection is a linear map of homogeneous coordinates, and a linear map takes a quadratic form to a quadratic form.

So the outline of a quadric is a conic. Always, whatever the surface and wherever the eye. The ball’s ellipse in the ball at the edge of the frame is not a special case; it is this statement met once.

The three matrix products

Doing it by sampling is honest and slow. There is a closed form and it is worth writing out, because the shape of it explains why the outline is the object it is.

C∗=P Q∗ PT,C=adj⁡C∗C^{*} = P\,Q^{*}\,P^{\mathsf T}, \qquad C = \operatorname{adj} C^{*}

where Q∗=adj⁡QQ^{*} = \operatorname{adj} Q is the dual quadric and C∗C^{*} the dual conic. A dual quadric is a list of the planes tangent to the surface; a dual conic is a list of the lines tangent to the curve.

The duals are the right objects because of what an outline is made of. The eye does not see chosen points of the surface; it sees which planes graze it. Push the tangent planes forward through the camera and what comes out is the set of tangent lines to the outline, which is the outline’s dual. Written that way there is no case analysis, no silhouette tracing and no sampling.

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. 4 The two routes against each other over a decade of distance. The traced contour generator lands on the conic the duals predict to nineteen decimal places everywhere, and the plot is flat, which is what an identity looks like.

The adjugate rather than the inverse is not a stylistic preference, and the next section is why.

Where it stops

A cone and a cylinder are singular quadrics: their determinant is zero, so Q−1Q^{-1} does not exist. The adjugate does, and it is rank one.

Push a rank-one dual through the camera and the result is rank one. As a dual conic, a rank-one matrix is not a curve at all — it is a point, and the set of lines it names is the pencil of all lines through that point.

A cone's outline is two lines, and the duals name only where they crossThe contour generator of a cone, traced on the surface and projected. It is two straight rulings, and every traced point lies on one of them to 1.9e-12 px. The dual formula returns a rank-1 matrix — its second eigenvalue is 4.0e-17 of its first — which as a dual conic is a single point: the image of the apex, at 345, 39. It names the point the two lines pass through and forgets which two they are.where the duals pointcorrect from 17 cm, at 160 mm widerank 1 dual · on the lines to 5.4e-12 px
Fig. 5 A cone’s outline. It is two rulings, and every traced point lies on one of them to two parts in a million million of a pixel. The dual formula returns a rank-one matrix whose second eigenvalue is three parts in a hundred million million million of its first, and what that matrix names is a single point: the image of the apex.

Which is right, and useless. The outline of a cone from outside is two lines through the image of the apex; the dual conic names the point they pass through and forgets which two they are. Taking the adjugate back to recover the point conic gives a matrix of zeros — a millionth of a millionth of the size of its own entries — and a routine that normalised those zeros would return a perfectly plausible ellipse with nothing behind it.

So outlineConic refuses. It measures the rank of the dual, and a rank other than three is an error rather than a number to press on with. The refusal is the useful part: the point route is unaffected — the contour generator is still the polar plane’s section, still exactly two straight lines, still projects to the outline — so what has been found is not a hole in the theory but a domain.

Why the degenerate section had to be handled at all

Tracing a plane conic is normally done by sweeping a direction out of its centre and solving a quadratic. That is fine for an ellipse and impossible here: a pair of parallel lines has no centre, and a pair of crossing lines has one exactly where the tracing would divide by nothing.

So the tracing is done by parallel chords instead — sweep one coordinate, solve for the other — and where the curve exists at all is itself solved rather than searched for, because the chord’s discriminant is a quadratic in the sweep coordinate. A bounded section then gets its own extent and an unbounded one gets whatever clip the figure asked for.

That is a small implementation decision and it is the reason the four surfaces are one routine rather than two. A version that swept directions would have worked on the two proper quadrics, would have thrown on the two singular ones, and would have suggested that the singular ones were a different subject.

What the receiving surface costs a four-point fitThe same lamp and the same occluder, cast onto four surfaces. Four marks of the shadow are matched to four known points of the occluder, the map they determine exactly is built, and the other sixty-eight points are predicted by it. On the plane the prediction is right to 3e-13 mm; on the others it is not, and the fit is still exact at the four everywhere — 2e-13 mm — which is what makes the rest a prediction rather than a residual.a flat floor3e-13 mma homology — four points determine ita dished floor5.67 mmnot a homologya ridged floor9.07 mmnot a homologya floor with a step74.95 mmnot a homologyworst error of the predicted pointsexact at the four fitted, on every surface
Fig. 6 The same lesson from the light field, where a shadow is cast onto four differently shaped receivers by one routine. Writing the general case first is what makes the special ones comparable.

Which conic comes out, and what decides it

The outline of a ball is an ellipse in every ordinary picture, and it need not be.

The test is the one the conic a circle becomes already gives for a curve, and it transfers without a word changed: the type of the image is decided by whether the object reaches the plane through the eye parallel to the picture. A contour generator entirely in front of that plane images as an ellipse. One that touches it images as a parabola. One that crosses it — which happens when the eye is close enough to the surface for the grazing curve to wrap past the eye’s own plane — images as a hyperbola, and half the outline is off at infinity.

For a sphere the crossing cannot happen at all from outside: the grazing circle is always nearer the eye than the centre is, so it is always in front of the eye’s own plane, and a ball is an ellipse in every picture anybody takes. For an unbounded quadric it happens constantly: a cylinder that runs past the observer has an outline with two branches, and a paraboloid seen from close in has a hyperbola for an outline. The formula does not notice — it returns the conic and the conic knows which kind it is — and the drawing has to notice, because an unbounded outline cannot be traced as a closed loop.

The eye's polar plane cuts a cylinderThe 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. A cylinder is a singular quadric, so the section is a pair of straight lines rather than a closed curve, and its two branches run off the ends of the clip.correct from 18 cm, at 160 mm widea singular quadric · a pair of lines
Fig. 7 A pipe whose outline is unbounded, drawn by clipping rather than by closing. Where a bounded section gets its own extent solved for it, an unbounded one has to be told how much to show.

The formula in two lines, and what one view costs

The three matrix products were stated above and used. They are also provable in two lines, and the proof is the reason the duals had to be the objects rather than a convenient choice among several.

A camera sends world points forward: x=PX\mathbf{x} = P\mathbf{X}. It sends image lines backward: the set of world points landing on a line ℓ\ell is the plane PTℓP^{\mathsf T}\ell, because ℓTPX=(PTℓ)TX\ell^{\mathsf T}P\mathbf{X} = (P^{\mathsf T}\ell)^{\mathsf T}\mathbf{X}. So a line and the plane of sight through it are the same object written twice.

Now the outline’s tangent lines are exactly the lines whose planes of sight graze the surface. A line ℓ\ell is tangent to the outline when ℓTC∗ℓ=0\ell^{\mathsf T}C^{*}\ell = 0; the plane PTℓP^{\mathsf T}\ell is tangent to the quadric when (PTℓ)TQ∗(PTℓ)=0(P^{\mathsf T}\ell)^{\mathsf T}Q^{*}(P^{\mathsf T}\ell) = 0. Those two conditions must hold for the same lines, and the second is ℓT(P Q∗PT)ℓ\ell^{\mathsf T}(P\,Q^{*}P^{\mathsf T})\ell, so C∗=P Q∗PTC^{*} = P\,Q^{*}P^{\mathsf T} and the derivation is finished.

Nothing in it would work in the primal. A point of the surface has no image-side partner to be matched with, because the projection is not invertible on points — a whole ray comes back — while it is invertible on the incidence a line and a plane share. That is the general lesson: when a projection has to be pushed forward, push the objects it pulls back cleanly.

And the same equation says what a single view throws away, exactly. The map Q∗↦P Q∗PTQ^{*} \mapsto P\,Q^{*}P^{\mathsf T} is linear, from the ten entries of a symmetric four-by-four to the six of a symmetric three-by-three. So it has a kernel, and the kernel is computable rather than estimated. Let e\mathbf{e} be the camera centre, the null vector with Pe=0P\mathbf{e} = 0. Then for any vector a\mathbf{a},

P (eaT+aeT) PT=0,P\,(\mathbf{e}\mathbf{a}^{\mathsf T} + \mathbf{a}\mathbf{e}^{\mathsf T})\,P^{\mathsf T} = 0,

and those are all of them: a four-parameter family of dual quadrics draws the identical outline. Nine degrees of freedom in, five out, four lost — the same four, counted twice, and the second count names them. Geometrically they are the quadrics inscribed in one tangent cone: slide an ellipsoid along the cone, fatten it until it touches everywhere, and every one of them grazes the same planes through the eye.

That is a sharper version of the standing refusal that a single picture of a plane makes, and it is sharper in a useful way. The usual statement is that one view cannot recover a scene’s scale; this one says which four directions in the space of quadrics are dark, writes them down as eaT+aeT\mathbf{e}\mathbf{a}^{\mathsf T} + \mathbf{a}\mathbf{e}^{\mathsf T}, and hands the next view something specific to be asked about.

Two members of that family are already on this page, which is the check that it is real rather than a count. The tangent cone through the eye is in it — it grazes exactly the planes the surface grazes, by construction — and so is the flat disc cut by the polar plane, which is the family’s other degenerate end. Both draw the outline the ellipsoid drew. So the refusal recorded two sections above, where a cone’s dual comes back rank one and outlineConic stops, is not an awkward exception sitting outside the theory: it is the boundary member of the very family that makes a single view four-fold blind, met from the other direction. A routine that pressed on there would be reporting one member of a family as though the view had chosen it. Stated the other way round, the rank of the dual is not an implementation detail to be guarded against but the one place where the family’s structure becomes visible inside a single view, which is why the refusal is worth reporting rather than smoothing over.

Nine points, and what a quadric costs

A conic has five degrees of freedom, which is why five points fix one and why five marks and the sixth is a prediction rather than a fit.

A quadric is a symmetric four-by-four up to scale, which is nine. So nine points in general position fix a quadric, and a tenth is predicted. That is the same sentence again with the number changed, and it sets the price of the whole class: recovering a quadric from marks is nearly twice the work of recovering a conic, and every conditioning problem the conic fit has is worse.

Two circles, differently tilted, drawing one pictureBoth are 6.4 m across and both are in front of the camera; their planes are 23.61° apart. Each draws the conic to 1.1e-16 on normalised coefficients, while a plane one degree from either draws one 2.5e-4 away — so the agreement is a measurement and the ambiguity is real. And the distance is free on top of that: at 1.7× the range the same picture is drawn by a circle 1.7× as wide.horizonflat on the groundleaning 23.6°two circles, 6.4 m across, in planes 23.6° apartcorrect from 26 cm, at 160 mm widetwo poses, 23.6° apart, one picture
Fig. 8 The plane version, where five is enough and four is not: the family a short measure leaves, drawn rather than described.

The outline route sidesteps that entirely, and it is worth being clear about why. Nothing here fits a quadric to anything. The quadric is given — it is the object being drawn — and the question is what its picture is. That is the forward direction, and it is exact. The backward direction, recovering a quadric from its outlines in several pictures, is a real subject with real conditioning, and the outlines it works on are the ones computed here.

The two curves on one solid

A quadric seen from a point has a contour generator. A quadric lit from a point has one too, and they are different curves.

That is the same construction twice with the centre moved, which is this site’s oldest habit and the reason the light field needed no new machinery when it was opened. One routine computes the curve for a lamp and another computes it for an eye, written at different times for different reasons, and they agree on the case they share.

What comes out of it that a silhouette does not give

The outline as a conic is five numbers rather than a traced curve, and the difference matters as soon as anything is to be recovered.

Fitting a conic to a drawn outline and taking the tangent cone through the eye gives back a cone in space, exactly. For a sphere the axis of that cone is the direction to the ball and its half-angle is the ratio of radius to distance. For a cylinder the two outline lines meet at a vanishing point, which is the direction of the axis, recovered from an outline with no end-caps visible anywhere.

What this does not say

It does not say that real solids are quadrics. Almost nothing is. What the class buys is that the outline of a member is exactly computable, which makes it the right place to check a silhouette routine that will later be pointed at something arbitrary — the same reason this site draws boxes rather than buildings when it wants to recover a camera.

It does not say the contour generator is visible. It is a curve on the surface and the reader is looking at the surface edge-on there, so nothing marks it in the picture except the outline itself. Where it is visible is on a second solid: the curve where a ball turns away from a lamp is drawn on the ball as the edge of its own shadowed part, and that is the version the edge of a shadow is drawn on the object can point at.

It says nothing about finding the outline in a photograph. Every outline here is computed from the surface, and detecting one in an image is a matter of image data, which this site’s multi-view ruling puts outside its own scope on purpose.

And it does not say the dual route is better. It is faster, it has a domain, and the point route has no domain and is slower. Keeping both is what let the domain be discovered at all: the disagreement was not predicted, it was found by running one against the other and watching the check fail.

The transferable form

The interesting half of this essay was not the formula. It was the day the formula stopped working.

A closed form and a sampled routine kept side by side will eventually disagree, and the disagreement is where one of them has a domain the other does not. A single route never tells its user which cases it is wrong on.

That is the same shape as the site’s oldest habit stated from a new angle. Two routes are usually kept so that agreement means something; here they were kept and the disagreement meant something, and it meant the more useful thing. A cone’s outline was going to be drawn either way; without the second route it would have been drawn from a normalised matrix of numerical zeros, and it would have looked entirely reasonable.

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.

AdjugateCamera matrixConicContour generatorDegeneracyDemonstrationDual conicDual quadricHomogeneous coordinatesPolar planepole and polarQuadric