Paths and directions

The quickest route is not the shortest

Every route on this site so far is in a medium that does nothing, so length and time are the same question divided by a constant. Once the water moves, they are different questions with different answers: the quickest track sails five per cent further and arrives eleven per cent sooner, and the journey back takes four times as long as the journey out.

Eight essays on this ladder compute routes, and every one of them is in a medium that does nothing. The shortest path between two points is a great circle; the constant-bearing path is a rhumb line; the shortest admissible path past an obstacle is two tangents and an arc. In all three, length is what is being minimised — and that is a choice that looks like no choice at all, because with a constant speed through a motionless medium, length and time are the same quantity divided by a constant.

A ship is in water that moves and an aircraft is in air that moves, at speeds that are a serious fraction of their own. A twenty-knot vessel in a three-knot current, an airliner in a hundred-knot jet stream: in both cases the medium’s speed is between a seventh and a fifth of the craft’s. Once that is true, length and time stop being the same question, and the second one has a different answer with a different shape.

The shortest route and the quickest one, in a zonal jet. A craft making 20 km/h through the medium, from 40° north, 34° west to 52° north, 6° east. The great circle is 3313 km and takes 111.6 hours in this flow; the quickest track is 169 km longer — 5.1 per cent further — and takes 99.1 hours, saving 11.2 per cent of the time. The strokes are the flow at its own scale, and the whole difference is that the track bends into the helping part of it. Drawn in Lambert conformal conic.
Fig. 1 A craft making 20 km/h through the medium, crossing a zonal jet that peaks at 26 km/h. The great circle is 3,313 kilometres and takes 111.6 hours in this flow; the quickest track is 169 kilometres longer — five per cent further — and takes 99.1 hours, saving eleven per cent of the time by bending into the part of the flow that helps.

What is being minimised

The problem is Zermelo’s, posed in 1931. A craft makes a fixed speed V through a medium moving at w(x), and the question is the heading to steer at every moment so as to reach the destination soonest.

Its whole content is in one closed form, which is the time to cross one short displacement:

Dtw=V\left|\frac{D}{t} - w\right| = V

The craft’s velocity over the ground is its own velocity through the medium plus the medium’s, so the ground velocity D/t must lie at distance V from w. That is a quadratic in 1/t, and its larger positive root is the quickest crossing. Everything else in this essay is that expression, minimised over paths.

Two things fall out of it before any computation. When |w| < V the quadratic has a positive root for every direction, so every displacement is possible and the craft can go anywhere, however slowly. When |w| > V it has one only for displacements with D·w > 0: the craft has lost the ability to choose its direction, and the set of places it can reach stops being everywhere.

Time saved, distance spent

The saving is not free. The quickest track is longer than the shortest one — necessarily, since the shortest one is the shortest — and the whole of the argument is that the extra distance buys more time than it costs.

What the detour buys, as the flow gets stronger. The same journey at six flow strengths, from a still medium to one moving at 1.5 times the craft's own speed. The upper curve is the time saved by taking the quickest track instead of the great circle, and the lower one is the extra distance it costs, both as percentages. In a still medium both are zero, which is the check that the two routes are the same object when there is nothing to route around; both grow with the flow, and the saving grows faster than the cost.
Fig. 2 The same journey at six flow strengths, from a still medium to one moving at 1.5 times the craft’s own speed. The upper curve is the time saved by taking the quickest track rather than the great circle; the lower one is the extra distance it costs. In a still medium both are exactly zero, which is the check that the two routes are the same object when there is nothing to route around.

The zero at the left is the control and is worth more than it looks. A route optimiser that reported a saving in a motionless medium would be reporting the error of its own search, and the whole comparison would be measuring the machinery rather than the flow.

There and back are different journeys

Out and back are different journeys, and different routes. The quickest track from 42° north, 34° west to 42° north, 6° east takes 73.8 hours and the quickest track back takes 300.6 — a factor of 4.08 — against 163.7 hours for the same distance in a still medium. The two tracks are not the same curve: the outbound one uses the flow and the inbound one avoids it. A quantity that is not the same in the two directions is not a distance, and the geometry this defines is a Randers metric rather than a Riemannian one. Drawn in Lambert conformal conic.
Fig. 3 The quickest track east along a jet and the quickest track back. Going with the flow takes 73.8 hours; coming back takes 300.6, a factor of four, against 163.7 hours for the same distance in still water. The two tracks are not the same curve: one uses the jet and the other avoids it.

Every geometry on this site so far has been symmetric. A great-circle distance is the same in both directions — and it fixes the highest latitude a route will reach before the journey starts; a rhumb line has the same length whichever end is called the start; even the route that must go round an obstacle is the same route reversed.

Time in a moving medium is not. Eastward along the jet the crossing takes 73.8 hours; westward against it, 300.6 — and the two tracks are different curves, because the outbound one seeks the flow and the inbound one avoids it. The still-water time for the same pair of points is 163.7 hours, so one direction beats it by more than half and the other loses by nearly double.

The name for this is a Randers metric: a Riemannian metric plus a one-form, which is the standard example of a Finsler geometry that is not Riemannian. Its defining property is exactly the asymmetry — F(x, y) ≠ F(x, −y) — and everything that follows from a distance being symmetric is unavailable. There is still a triangle inequality, and there is still a shortest path between two points; what there is not is a distance between two points, only a duration from one to the other.

That is not a technicality invented to describe an inconvenience. It is why a sailing route’s two legs are planned separately, and why the outward and return tracks of a long flight are drawn as different curves on the same chart.

Where a craft can be after eight hours

Where a craft can be, after a stated number of hours. The set of places reachable within a stated time from 40° north, 34° west at 20 km/h in a zonal jet, drawn at five times up to 283 hours. With no flow these would be circles on the sphere centred on the start; here they are not, and the direction they bulge in is the direction the medium is going. The strokes are the flow. Drawn in Lambert conformal conic; the isochrones are drawn from the 67 × 37 grid the times were computed on.
Fig. 4 The set of places reachable within a stated time, at five times. With no flow these would be circles on the sphere centred on the start; here they bulge downstream, and the direction they bulge in is the direction the medium is going.

Isochrones are the classical navigator’s tool and they are the reachable sets of this metric — the same object the sheets an atlas needs counts in a static form: the ball of radius T about the start. In a still medium they are circles on the sphere and the picture says nothing. In a moving one they are not, and their shape is the flow’s signature.

They are also the reason the problem is usually solved forwards rather than by aiming at the destination. A navigator advances the isochrone hour by hour and reads the answer off it when the destination is inside; the track follows by working backwards from where it touched.

What was computed, and how

The textbook route to a time-optimal track is Zermelo’s own: a differential equation for the heading, derived from the maximum principle, integrated from a guessed initial heading and shot at the destination. That was not taken here, and the reason is worth stating, because it is the kind of decision that usually goes unrecorded. On a sphere the derivation carries the frame’s own rotation terms, and a sign error in them produces a family of perfectly plausible curves that are not optimal paths. Nothing in the picture would look wrong.

What is done instead is a direct minimisation in two stages. The minimal-time field over a grid of the sphere is a shortest-path problem in the closed-form edge cost above, which gives a track that is right in shape; the track is then polished by moving its own waypoints until none of them can be moved to save time.

The grid's own error is angular, and refining the grid does not touch it. A route computed in a still medium, where the answer is the great-circle distance and is known exactly. A shortest path over a grid can only travel in the directions the grid offers, so a track heading between two of them zigzags: the duration comes out 2.44 per cent high, and it stays there as the grid is refined by a factor of eight, because the error is set by the angles between the sixteen available directions and not by their length. Polishing the track — moving its own waypoints until none of them can be moved to save time — removes it entirely, which is why every duration on this ladder is a polished one.
Fig. 5 A route in a still medium, where the answer is the great-circle distance and is known exactly. The grid’s answer is 2.44 per cent high, and it stays 2.44 per cent high as the grid is refined by a factor of eight — the error is angular, set by the gaps between the sixteen directions the grid offers, and refining the grid does not touch it. Polishing the track removes it entirely.

The second stage is not tidying. A path over a grid can only travel in the directions the grid offers, so a track heading between two of them zigzags, and the duration comes out high by 1/cos(δ/2) − 1 for the largest gap δ between neighbouring directions. For the sixteen-direction stencil used here that is 2.44 per cent — and it is not a resolution effect: the same figure shows it unmoved as the grid is refined from two degrees to a quarter. Every duration quoted in this essay comes from a polished track, whose error against the exact answer is 0.0008 per cent.

The polish itself had to be built twice, and the failure is instructive. Sweeping the waypoints at a fixed step and halving the step only when a whole sweep makes no move is the obvious loop, and at full resolution it stalls: moving one waypoint of a smooth track gains only the second order, so the long-wavelength error falls at a rate that goes as the square of the waypoint count. From a straight-in-coordinates start the track settled 0.12 per cent above the geodesic and looked entirely reasonable. Polishing four waypoints, doubling, and polishing again removes the long wavelengths where they are cheap, and lands on the geodesic to a part in ten thousand.

The case with an exact answer

The one flow with a closed form, and what the search returns for it. In a medium rotating rigidly there is a frame in which nothing is moving, so the quickest track is a great circle in that frame and the duration is the smallest T with d(A, R(−ΩT)·B) = V·T — one scalar equation, solved by bisection, involving no grid and no search. It gives 79.6315 hours for this journey at 20 km/h in a medium turning at 40 km/h at the equator. The bars are how far the search's own answer sits from it at three grid spacings, in per cent. Two routes to one number, sharing no code, is the strongest check this file has.
Fig. 6 In a rigidly rotating medium there is a frame in which nothing is moving, so the quickest track is a great circle in that frame and the duration is the smallest T with d(A, R(−ΩT)·B) = V·T — one scalar equation, solved by bisection, with no grid and no search in it. The search’s own answer matches it to a part in a million at three grid spacings.

This is the check the whole file rests on. A medium rotating rigidly has no structure at all, so in the co-rotating frame the craft simply travels a great circle at speed V — and the destination, fixed in the outer frame, moves. The duration is therefore the smallest T satisfying one scalar equation, which is solved by bisection and shares no code with anything else here.

The grid-and-polish answer is 79.6316 hours; the closed form is 79.6315. Two routes to one number, agreeing to 1.2 parts in a million, with nothing in common but the problem.

Somewhere a craft cannot go

Somewhere a craft making 20 km/h cannot go. An outflow centred at 45° north, 0° east, rising from nothing at the centre to 34 km/h on a ring of 10° and dying away outside it. Wherever the outward flow exceeds the craft's own speed the craft cannot make ground against it, so the whole disc inside the 18.0° circle — 14.5 per cent of the grid — is unreachable from outside at any heading and after any length of time. The circle is computed from the flow alone, by solving for where its speed equals 20 km/h; the shaded points are what the route search actually failed to reach. Drawn in Lambert conformal conic.
Fig. 7 An outflow rising from nothing at its centre to 34 km/h on a ring of 10°, against a craft making 20. Wherever the outward flow exceeds the craft’s own speed it cannot make ground inward, so the whole disc inside the 17.99° circle is unreachable from outside — at any heading, and after any length of time.

When the flow is faster than the craft anywhere, the geometry acquires a feature no distance has: places that are at infinite time. The boundary is not drawn from the search’s failures — it is computed from the flow alone, by solving for where its speed equals the craft’s, and the search’s failures are then required to lie inside it.

The measurement needed one correction and it is the kind that quietly ruins a figure. The domain has to be wide enough to sail round the obstruction. Drawn on a box whose edges came within the ring’s own radius of the centre, 69 per cent of the grid came back unreachable — the craft was being stopped by the edge of the figure rather than by the water. On a domain twice as wide the answer is 14.5 per cent, every blocked point lies inside the computed circle, and the boundary is the flow’s rather than the picture’s.

What the map still cannot show

New York to Madrid on Mercator. Two routes. The great circle is 5768 km and is the shortest path on the sphere. The rhumb line holds a single compass bearing the whole way and is 5939 km — 171 km further, or 3.0 per cent. On Mercator the rhumb line departs from straight by 9.6e-16 of its own length.
Fig. 8 The same pair of quantities in a still medium, on the projection that answers the other question. The great circle is the shortest route and the straight line on this chart is the constant-bearing one; neither is a time-optimal track, because in a motionless medium the two coincide and there is nothing for a third curve to be.

A time-optimal track shares one difficulty with every other route this collection draws: it has to be shown on a map, and the map bends it. The shortest route is not straight on almost any projection, and the quickest route is not straight on any projection at all — there is no gnomonic equivalent for it, because the curve depends on the flow and no fixed construction can straighten a family of curves that changes with the water.

That is a genuine loss. The gnomonic companion exists because one projection turns every great circle into a straight line, which made great-circle sailing practical for three centuries with no computation at all; and Mercator exists because another turns every constant-bearing path into a straight line. Both are answers to what must a map do so that this family of routes is easy to draw, and both work because the family in question is fixed by the sphere.

London to Tokyo, seen four ways. The same two routes on four projections. The gnomonic projection renders every great circle as an exactly straight line, which is what it is for; Mercator renders every rhumb line straight instead. Neither path changed — only the map did.
Fig. 9 One great circle on four projections. The route is the same object in all four and looks like four different curves, which is the ordinary difficulty; a time-optimal track adds a second layer, because its shape depends on a field that no projection is chosen with respect to.

So the practical answer is the one the isochrone method already gives: compute the track, then draw it, on whatever projection the chart happens to be. The nineteenth-century arrangement in which the map did the optimisation is not available here, and its absence is exactly what makes the problem computational rather than graphical.

Where the model stops

The flow fields here are formulae with three constants each, not measurements. That is the same decision this site made about coastlines: a current chart is a measurement of one ocean on one day, and a figure drawn from one would be partly a picture of the vendor’s interpolation. What is being measured is the geometry a moving medium creates, and every number above can be reproduced from the constants in the caption.

Three further idealisations are worth naming. The flow does not change with time, so nothing here is a forecast — real routeing is done against a forecast whose error grows with the horizon, and the optimal track for a flow that will have changed by tomorrow is a different problem. The craft’s speed through the medium is constant, where a real vessel’s depends on the sea state and a real aircraft’s on altitude and weight. And the craft is free to steer any heading at any moment, which is what makes the track a smooth curve rather than a handful of constant-heading legs.

What survives all three is the structure: a moving medium turns a symmetric distance into an asymmetric duration, and every consequence in this essay follows from that alone.

The generalisation

Zermelo’s problem is the standard introduction to Finsler geometry for a reason, and the reason is visible in the pictures. A Riemannian metric measures a direction’s cost by a quadratic form, which is symmetric by construction; a Randers metric adds a linear term, which is not. Any system where the cost of moving depends on the direction of travel — a current, a wind, a slope, a one-way street — has this shape, and the intuitions that come from distance are the ones that fail.

The single most portable consequence: in such a geometry, the shortest path and the cheapest path are different curves, and asking for the shortest one is a choice rather than a default. Every route on the rest of this ladder makes that choice by assuming the medium does nothing.

Who found it, and when

Zermelo posed and solved the navigation problem in 1931, in the plane and with a general wind field, and gave the differential equation for the optimal heading that carries his name. Randers introduced the metric in 1941 from an entirely different direction — general relativity, where the linear term is an electromagnetic potential — and the identification of Zermelo navigation with Randers metrics was made much later, by Bao, Robles and Shen in 2004.

The practical side is older than either. Isochrone routeing was in use for transatlantic sailing well before it had a name, and the method a navigator used — advance the reachable set by an hour, repeat — is the same forward construction that appears in the isochrone figure above.

What the asymmetry forbids

There and back are different journeys is the finding with the widest reach, and several ordinary planning habits depend on the opposite being true.

A round trip cannot be planned as one leg reversed. The optimal outbound track is not the optimal return track, and neither is the reverse of the other, so a passage plan that computes one and mirrors it has optimised half the journey and merely drawn the other half. The two legs must be solved separately, against the same medium.

A range ring is not a ring. The set of places reachable in a given time is not centrally symmetric about the start — that is what the isochrone figure shows — so a circle drawn at the craft’s speed times the time is wrong in both directions at once: it claims places downstream that are further than it says, and denies places upstream that are nearer. Every planning tool that draws an endurance circle is drawing the medium-free answer.

And a fuel or endurance budget is directional. The reserve required to reach a point and return is not twice the reserve to reach it, and the difference is not small in a strong medium. A budget computed from a distance and a nominal speed is computing in the wrong geometry.

The same structure is everywhere in ordinary routing, which is what makes the Finsler picture worth having rather than exotic. A road network with one-way streets, gradients that cost more uphill than they save downhill, or traffic that flows asymmetrically has exactly this property: the cost from A to B is not the cost from B to A, and the reachable set is not symmetric. Routing engines have handled that for decades by treating the graph as directed, which is the discrete version of the same statement.

The two are not competitors. A graph is what a road network is; a field is what a current or a wind is, and discretising a field into a graph is a modelling choice with its own resolution error.

What the continuous version adds is that the asymmetry has a shape. A directed graph records that the two costs differ; a Randers metric says by how much and in which direction, as a field, and lets the reachable set be constructed rather than searched.

One practical consequence follows immediately and is worth separating from the geometry. Because the reachable set is not symmetric, a round trip has no midpoint in the sense anybody means by one: the place half the outbound time from the start is not the place half the return time from the end, and a plan that turns back at the halfway point of the clock arrives home late. Every operational rule that says turn at half fuel is assuming a symmetric metric, and the size of the mistake is the size of the asymmetry the field carries.

The same asymmetry is why a published isochrone map is only ever half a statement: it says where a vehicle can get to in an hour, and never where a vehicle an hour away can get back from.

Where the ladder goes next

This rung puts a medium into the space the routes are drawn in, and everything it changes is a consequence of one asymmetry. What it does not do is put an obstacle and a medium together: a route that must avoid a region and also use a current is a constrained problem in a Finsler geometry, and the shortest path past a circular exclusion solves the first half of it with a closed form that the second half would remove.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

What links here

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

AsymmetryClosed formFinsler geometryFlow fieldGeodesicGreat circleIsochroneOptimal controlRanders metricReachable setShortest pathZermelo navigation