What survives a pane of glass
The previous essay was demolition: a picture taken through water is not a projection of anything from anywhere, and the invariant the site is built on comes back one and a quarter per cent out.
This one is the opposite result from the same machinery, and it is the more surprising of the two. Put glass in the way with air on both sides of it — a shop window, the front of a museum case, a pane in a door — and something is preserved exactly. Not approximately. Exactly, to the last bit a double can hold.
What survives is every direction. What does not survive is every position.
Why a slab is different
Trace a ray into a slab and out again. It refracts toward the normal on the way in, travels through the glass at the shallower angle, and refracts away from the normal on the way out — by exactly the amount it was bent by on the way in, because the two interfaces are parallel and the media on either side are the same.
So the emergent ray is parallel to the incident one. It is not the same ray: it has been shifted sideways by
where is the thickness and the angle inside the glass. For a 25 mm case front in crown glass at 35° incidence that is 5.99 mm.
Everything in this essay is a consequence of those two sentences. Direction preserved, position not.
The consequence for vanishing points
A vanishing point is the image of a direction. It is the limit of the images of points marching away along that direction, and it depends on nothing else about them — not on where the line starts, not on how far along it anything is.
Marching out along a direction, the ray from the receding point to the pinhole tends to a fixed direction, and the slab’s lateral shift tends to a fixed length. A fixed length matters less and less as the point recedes, and in the limit it does not matter at all. So the vanishing point through the glass is the vanishing point without it.
The figure measures this the honest way rather than substituting the closed form. A point is marched out to forty million metres along each of three world directions and photographed through the glass, and the resulting mark is compared with the vanishing point the pinhole camera computes. They agree to 4e-6 px, and the residual is bisection precision in the layered-ray solver rather than anything geometric.
Meanwhile every finite point on the tabletop has moved by up to 4.5 px.
Deriving the displacement, because it is three lines
The lateral shift is quoted often enough to be worth deriving rather than looking up.
Set the slab’s faces at and , and send in a ray at to the normal. Inside, it runs at with , and it crosses the thickness while moving sideways by . Had the slab not been there, the same ray would have crossed the same thickness while moving sideways by . So the emergent ray is displaced along the face by
and the perpendicular displacement — the shift measured across the ray, which is the quantity usually quoted — is that times , which tidies into .
Two features are worth reading off it. It is zero at normal incidence, so a slab does nothing at all to a ray down its own axis — which is why looking straight through a window shows nothing amiss. And it grows without bound relative to the thickness as approaches 90°, so a grazing view through a pane displaces a great deal. The picture the two facts make together is a radial pattern: nothing at the centre of the frame, growing outward — which is why the effect looks, at a glance, exactly like the radial distortion of a lens, and is not.
The giveaway is the same one as in the water case. A lens’s distortion is a function of the image point alone. This is not: change the object’s distance without moving its image point and the displacement changes.
Which recovery survives, and which does not
This site has two recoveries and they are now cleanly separated by one pane of glass.
The camera recovery reads only vanishing points. Three mutually orthogonal world directions give three vanishing points; the principal point is their triangle’s orthocentre and the focal length falls out of . Nothing finite enters. So it survives the glass, and the figure runs it: the recovered focal length agrees with the true one to 4e-10 relative, out of a picture in which nothing is where it was.
The height recovery reads finite points. A height from one photograph is a cross-ratio along a vertical whose four points are the base, the horizon crossing, the top, and the vertical vanishing point — three of those are finite marks on the picture, and all three have moved.
That split is not a curiosity. It is a practical rule for anyone reading geometry out of photographs: calibration survives a window; metrology does not. A photograph of a building taken through a train window will give up its focal length and its principal point correctly, and will give a wrong answer for how tall the building is. The two facts sit in the same picture and nothing in it distinguishes them.
How big is the effect, really
Honest arithmetic, because the figure had to be staged to make it visible.
The displacement a slab adds to the image is roughly proportional to — the thickness over the object’s distance — times the angular factor . A 6 mm domestic window pane with the scene four metres beyond it moves the picture by about half a pixel on a 690 px frame, which is nothing.
So the figure is a display case: 25 mm of laminated glass with the object standing right against the back of it, 0.2 to 0.9 m away. That is where the effect is real, and it is a real configuration — museum cases, aquarium fronts, thick shop windows with a display immediately behind.
Everything claimed here is equally true of the window across the room. It is just too small to draw, which is the honest reason the figure is set where it is.
The slider runs the thickness from 6 mm to 60 mm, and the point movement scales with it while the vanishing-point movement stays at the solver’s noise floor across the whole range. That is the shape of the claim: one quantity grows linearly, the other stays at zero.
The other thing the glass does
The slab preserves directions, and a picture is not made of directions alone. There is a second effect and it is worth being precise about, because it is the one that stops the glass being harmless.
The shift depends on the incidence angle, and the incidence angle for a point depends on where that point is and how far away it is. So two world points on one ray of the pinhole camera — the same image point, by definition of a projection — are displaced by different amounts and stop being the same image point. That is the general result from the previous essay and it applies here too.
So the through-glass picture is not a projection of the scene. It is not even a warp of the pinhole picture, because the correct warp would need a depth the picture does not carry. What it is, is a map that happens to be exact on the points at infinity, and those are precisely the points the camera recovery uses.
An aside on the case with water behind it
An aquarium front is glass with air in front and water behind, and it is worth being clear that none of this essay applies to it.
The slab argument needs the same medium on both sides. That is what makes the two refractions cancel in direction, and it is the whole result. With water behind, the second refraction is into a different index and the emergent ray is not parallel to the incident one — its direction has changed, permanently, by the amount the previous essay measured.
So the aquarium and the display case, which look like the same object, are on opposite sides of the field’s central divide. The case preserves every vanishing point exactly. The aquarium preserves none of them, and its picture has no station point at all. One pane of glass and one body of water; the glass is almost incidental in both.
That is the sort of distinction the layered solver makes easy to state and easy to get wrong by hand. The list of layers for a case is air, glass with air beyond; for an aquarium it is air, glass with water beyond. One symbol, and the entire result changes.
The straightness of a drawn edge
A related question worth answering rather than leaving implicit: does a straight world line still image as a straight line through the glass?
Not exactly. The displacement varies along the line, because the incidence angle and the distance both vary along it, so the image is very slightly curved. The figure’s edges are drawn from their endpoints, which is what a ruler does, and the vanishing point found by fitting those chords is not quite the exact one — it lands within about half the movement of the points themselves.
That is the practical version of the claim, and it is weaker than the exact one. The exact statement — vanishing points are preserved to the solver’s noise — is about the limit, and the limit is not something a reader with four short drawn edges can reach. What a reader with four edges gets is a vanishing point good to a fraction of a pixel where the finite points have moved by several. Good enough that a focal length recovered from a real photograph through a real window is right to well within its other uncertainties, and not the exact result the marching measurement gives.
Both are worth quoting and it matters which is which. The site’s habit is to state the exact result where there is one and the achievable result beside it, rather than letting a reader assume the second is the first.
Where it shows up
Three places, and they are not exotic.
Museum and aquarium photography. A case front is thick and the subject is close, so the displacement is at its largest. A picture through one is fine to look at and wrong to measure from.
Windscreens and instrument covers. A camera behind a curved windscreen is not a slab problem at all — the surfaces are not parallel — and everything here fails to apply. A camera behind a flat instrument cover is exactly a slab problem, and the correction is a lateral shift that depends on the field angle.
Sensor cover glass. Every digital sensor sits behind a few millimetres of filter stack, and it is a plane-parallel slab. Its effect is absorbed into the lens design rather than corrected afterwards, which is why lenses computed for one sensor stack misbehave on another — an old and well-known problem with adapting lenses between systems, and it is this arithmetic, at a thickness of two or three millimetres and a very short distance.
What a reader can do about it
Suppose a photograph is known to have been taken through thick glass. What is recoverable?
The focal length and the principal point, to the accuracy the vanishing points allow. Run the recovery. Its own residuals say whether the bundles met; through a slab they meet nearly as well as they did in air, because the departure from straightness in each drawn edge is a fraction of a pixel over the edge’s length.
Angles at infinity. Anything that is a statement about directions: whether two walls are perpendicular, which way a street runs relative to the building on it, whether a drawing has two vanishing points or three.
Nothing that is a length or a ratio among finite points, without modelling the glass. If the thickness and the index and the standoff are known, the model is the layered solver in this field and it is invertible ray by ray, so the measurement can be recovered — but it is a ray-tracing problem, not a homography.
The awkward middle case is the common one: a photograph through glass of unknown thickness at an unknown standoff. There the honest answer is that the calibration is recoverable and the metrology is not, and no amount of care with the image changes that, because the missing information is a depth and the picture does not contain one.
The pattern this is an instance of
Stand back from the three results and there is a shape to them.
Refraction through a stack destroys the property that made a picture a projection: the map stops being a function of direction alone. But different parts of the geometry depend on that property to different degrees, and the parts that depend only on the limit — on directions at infinity — are untouched, because a lateral shift is a length and a length is negligible at infinity.
So the general rule is: what a slab preserves is exactly what is defined at infinity. Vanishing points are. The horizon is, being the join of two of them. Parallelism is, and so is the classification of a drawing as one-, two- or three-point. What is not defined at infinity — a length, a ratio along a line, a cross-ratio of four finite points, the position of a mark — is moved.
That is a satisfying way to end up, because it is the same distinction the site’s first field is built on. A projection destroys length, angle, area and the ratio of lengths and preserves the cross-ratio, and the reason is that the first four are affine or metric properties and the last is a projective one. Here the split runs one level further out: the projective properties defined at infinity survive a slab, and the ones defined among finite points do not.
The next essay leaves slabs behind for the case where the far medium is not the near one, and the whole sky arrives inside a cone of 48.61°.