What a ray does at a surface
Everything else on this site rests on one sentence: a picture is a projection through a centre. Every ray of it passes through one point, and every theorem quoted here — the cross-ratio surviving, parallel lines meeting at a vanishing point, a camera recoverable from three vanishing points — follows from maps of that shape.
Water breaks it. So does glass, and so does a real lens, and the interesting question is not whether they break it but by how much, and which parts of the theory survive anyway.
This field is that measurement. It begins here, at one surface, with one ray.
Snell’s law without an angle in it
The relation itself is old and short. Light crossing between two media obeys
with the angles measured from the surface normal. For water, ; for crown glass, 1.520; for the acrylic a diving port is made of, 1.491. Those are the sodium-D values and they are stated wherever they are used here rather than left implicit, because a figure whose refractive index nobody can find is a figure making an unfalsifiable claim.
The angle form has a defect that matters as soon as anything is computed with it: it needs a plane to measure the angles in. Choosing that plane by hand is exactly where a sign gets lost, and a sign lost in a refraction produces a picture that still looks like a picture — the same failure mode as the camera basis that pointed the wrong way up for a whole phase.
So the machinery here uses the vector form, which has no plane in it at all. With d the incident direction, n the unit normal pointing back into the medium the light came from, and :
If there is no transmitted ray at all and the function returns nothing, which is total internal reflection — a refusal rather than an error, because it is a real thing that happens and an essay in this field is about the boundary where it starts.
The two forms are checked against each other at every angle any figure uses, and the check has a third clause the angle form cannot state at all: the refracted ray must stay in the plane of incidence. The angle form assumes that; the vector form has to produce it, and it does, to the last bit of a double.
The number everybody knows, and the curve it sits on
Ask anyone who has looked into a swimming pool how deep it appeared and the answer will be some version of shallower. Ask a physics textbook and the answer is precise: the apparent depth is the true depth divided by the refractive index. A pool 1.5 m deep looks 1.13 m deep, because 1.5 / 1.333 = 1.125.
That answer is exact looking straight down, and wrong everywhere else.
Along a line of sight at from the vertical, the ray in the water runs at with , and the eye extends its own incoming ray straight down. The two reach the same horizontal offset at depth
which tends to as and falls all the way to zero as the line of sight lies down toward the surface.
The consequence is not a correction to the textbook figure. It is a different kind of object. The apparent bottom of a pool is not a plane at . It is a curved surface, rising steeply toward the far end, and that is why the far end of a swimming pool looks shallow enough to stand in and the near end does not. Everyone has seen this. Almost nobody connects it to the fact that the single number they were taught cannot describe it, because a single number describes a plane.
The same curve explains something more practical. A person standing at the edge of a pool judging its depth is looking at the far end at a steep angle and the near end at a shallow one, and gets two different answers from the same water. The mistake that follows is not a failure of estimation; it is the correct reading of a genuinely non-planar apparent surface.
The oldest practical version of this
The apparent-depth curve is not new information to anyone who has tried to spear a fish, and the traditional advice — aim below where it looks — is the curve stated as a rule of thumb. What the curve adds is how much below, and that it depends on the angle rather than on the depth.
Work an example. A fish 0.9 m down, seen at 60° from the vertical, appears at 0.444 m — less than half its true depth, where the textbook factor would say 0.675 m. The angular error in the aim is not the difference in depth but the difference in direction, and at that geometry it is several degrees: enough to miss at any range.
The same arithmetic runs the other way for something more common. A straight pole standing in water appears bent at the surface, and the bend is usually described as a single kink. It is not. Every point of the submerged part is displaced by a different amount, because every point is seen along a slightly different line of sight, so the submerged part of the pole appears curved rather than straight-but-tilted. The effect is small for a pole close to vertical and pronounced for one lying at an angle, and it is the same fact as the pool bottom not being a plane, seen on a different object.
That is worth pausing on, because it is the first place the field’s central claim shows up in ordinary life without any equipment at all: a straight thing in water is not imaged as a straight thing. A projection through a centre sends lines to lines. This does not.
What has just gone wrong, structurally
It is worth being explicit about the damage, because the rest of the field is the accounting.
A projection through a centre maps a point of the world to a point of the picture, and it does so in a way that depends only on the direction from the centre. Two world points on one ray from the centre have one image. That is what a projection is; it is why depth information is destroyed, and it is why a single view supplies every ratio and no size.
Refraction at a plane surface does not do that. The displacement a ray picks up depends on how far it travels in the denser medium, which is a distance, and a distance is not a property of a direction. So two world points on one ray from the eye no longer share an image point, and the map from the world to the picture is not a function of direction at all.
That is a stronger statement than “the picture is distorted”. A distortion of the image can be undone by warping the image, and this cannot: the correction that would put the two points back together depends on a depth the picture does not contain. There is no image-space repair, at any price, for any lens, ever.
The one solver
Almost every configuration in this field is the same problem: a pinhole, then a stack of flat layers perpendicular to the optical axis, then the object.
A window pane is air, glass, air. An aquarium is air, glass, water. A diver’s flat port is the same list read from the other end. A swimming pool seen from a chair beside it is air and then water, with no glass at all. In every case the interfaces are parallel, so Snell’s relation chains through them: is the same in every layer, and one unknown — the angle at the pinhole — decides the whole path.
The radius a ray reaches at depth is then
which is strictly increasing in , so finding the ray to a given object point is a bisection rather than an optimisation. That monotonicity is asserted rather than assumed, along with the bracket: the largest angle the stack can carry is set by the densest medium in it, because beyond the ray is totally internally reflected somewhere inside and never reaches the object at all.
One solver, and every figure in the field calls it. That is not tidiness. It is the claim: if the aquarium and the diving port needed different code they would be different phenomena, and they are not.
The check that makes the rest meaningful is the cheapest one in the file. With an empty stack — no glass, no water, nothing — the layered camera must reproduce the pinhole camera exactly. It agrees to about 10⁻¹³ px. Every number this field quotes is a difference between a refracted picture and a pinhole picture, so if the two disagreed by a pixel when there was nothing between them, every difference quoted anywhere would be that pixel plus noise.
Why the check on the vector form has three clauses
The assertion that guards Snell’s law here compares three things, and the third is the one that would be left out by anyone writing it in a hurry.
The first is the obvious comparison: the angle the vector form produces against . That catches a factor of in the wrong place and a where a belongs.
The second is the sign. The vector expression can be written with instead of , and the result is a perfectly good unit vector that points back into the medium the light came from. A figure built on it draws the refracted ray going the wrong way, and — this is the part worth stating — the angle check still passes, because the angle to the normal is the same for a ray and its mirror image. Only comparing the direction along the normal catches it.
The third is that the refracted ray stays in the plane of incidence. The angle form cannot check this at all: it assumes the plane, because a plane had to be chosen to measure the angles in. The vector form has to produce it, and it does, with the out-of-plane component coming out at exactly zero rather than at rounding noise. That clause is the reason the vector form is worth the extra three lines. It is the one property of the refraction that the schoolbook statement takes for granted, and it is the one an implementation is most likely to lose.
This is a small instance of a habit the whole site runs on and which the round trip is the large instance of: a second route that shares no arithmetic with the first. The angle form and the vector form agree here to 10⁻¹² degrees, and the agreement means something precisely because neither was derived from the other in code.
The critical angle, from the same relation
Run the relation the other way — light trying to leave the denser medium — and can exceed one. At that point there is no transmitted ray, and in the vector form goes negative.
The angle where it happens is , which for water is 48.61°. It is the same number twice over: it is the largest angle at which light can leave water, and therefore the largest angle at which light can arrive from the whole sky above. That second reading is Snell’s window and it turns out to be a picture surface with a property none of the six in the curved field has.
It is also the ceiling on what any flat port can see: a lens behind a flat window into water cannot photograph a field wider than twice the critical angle, whatever its focal length, because the rays outside that cone are not in the water to be photographed.
Three quite different-looking results, one arcsine.
What this field is not
Three honest omissions, stated here rather than discovered by a reader.
Nothing here is wavelength-dependent. A real refractive index varies with colour, which is why a prism works and why an uncorrected underwater picture has coloured fringes at its edges. Every index used here is the sodium-D value, so the essays say displacement and never chromatic aberration. Adding wavelength would multiply every figure by three and change no geometric conclusion.
Nothing here has a curved interface except the dome port, and that one is treated as a single refracting sphere rather than as a shell with a thickness. For a concentric shell that is exact — the outer surface undoes what the inner one did, because both normals are the same — and a dome port is built to be concentric. For anything else it would not be.
Nothing here is about what a diver sees, in the sense of perception. The eye underwater is a refracting instrument itself, badly out of focus, which is why a mask works. That is a fact about eyes, not about projection, and this site’s standing limit applies: it computes the geometry of pictures and says nothing about how a picture is seen.
Where the field goes
Four questions follow directly from the two results above, and each of them is an essay.
If the map is not a function of direction, is the picture a projection of anything at all, from anywhere? The rays, traced into the water and fitted to a common point, miss it by ten millimetres — and the same fit with the water removed misses by zero.
If the displacement depends on the path length in the denser medium, what happens when the denser medium is a slab with the same stuff on both sides? Every point of the picture moves and every direction survives exactly, which turns out to mean the camera recovery still works through a shop window and the height recovery does not.
If the whole sky arrives inside a cone, what does that cone do to it? It compresses the last few degrees before the horizon into a sliver, with an area scale that runs to zero at the rim — unbounded distortion, which no picture surface in the curved field has.
And if a flat window costs a third of the field of view, is there a shape that costs nothing? There is, and it costs exactly nothing rather than nearly nothing, provided it is centred to within a millimetre or so of the entrance pupil.
A note on what still works
It would be easy to read this field as demolition, and it is not.
The pinhole camera remains the right model of almost every picture anybody looks at. Air is a medium with an index of 1.000, to a part in ten thousand; a photograph taken through nothing is a projection through a centre and every theorem on this site applies to it exactly. The corrections computed here matter in three places — under water, behind thick glass, and at the edges of a real lens — and in the third of those the departure is the subject of its own field.
What changes is the status of the assumption. Before this field, “a picture is a projection through a centre” was the site’s foundation and was nowhere tested against a case where it fails. An assumption with no counter-case is a definition, and a definition proves nothing. The value of measuring the failures is that it turns the premise back into a claim — one that holds in air to fifteen digits and fails in water by one and a half per cent, with both numbers computed by the same machinery from the same scene.