Skip to main contentfinslerax

Randers metrics and Zermelo navigation

A Randers metric adds a one-form to a Riemannian norm. The same family arises from Zermelo's navigation problem: minimum-time travel at fixed own-speed through a moving medium. finslerax uses this navigation data because its two parts retain their physical meaning.

Zermelo's navigation problem

Suppose we have a boat on a lake, holding a fixed speed through the water whichever way it is pointed. In still water, a Riemannian metric describes the travel-time geometry: its geodesics are the quickest paths. Once a wind arises, the old Riemannian shortest paths still minimise length in the still-water metric, but they need not minimise time. The boat covers ground faster with the wind than against it, and a varying wind can also bend the optimal route.

The same structure turns up wherever something moves under its own power through a medium that is itself in motion: a submarine crossing an ocean current, an aircraft in a wind field, a fire spreading with the wind behind it. Zermelo formulated the minimum-time problem for a prescribed wind distribution in 1931.

Finsler metrics provide the corresponding travel-time geometry because they do not require a step and its reverse to have equal cost. The Randers metrics are the subclass standing in direct correspondence with Zermelo’s problem: a Finsler metric is Randers precisely when it is the minimum-time metric of some craft with fixed own-speed in some moving medium. Randers wrote the family down in 1941, for an asymmetric metric in general relativity rather than for navigation at all (Phys. Rev. 59, 195), and the correspondence with Zermelo’s problem — which runs in both directions — was established much later, by Bao, Robles and Shen in 2004.

The two halves of the navigation data

The Riemannian metric hh describes what the craft can do in a still medium: the set of velocities it can hold under its own power is the hh-unit sphere, which folds together how hard the surroundings are to move through at that point — shallows, terrain, viscosity — and any preference the craft itself has for one heading over another. The vector field WW is the drift, the wind or the current itself, added on top of whatever the craft manages under its own power.

That decomposition fixes the shape of the unit ball immediately. In unit time the craft reaches the hh-unit sphere around its position under its own power alone, and the medium then carries that entire set bodily by WW, so the indicatrix — the set of directions affordable at unit cost, from the previous page — is the hh-unit sphere translated by WW. It is the displaced ellipsoid of the previous page, reached this time from the dynamics rather than from the picture.

Loading randers-indicatrix…

randers-indicatrix

Drag the wind. The arrows are the drift field, the same vector at every point of the plane; the faint circle is what the craft could reach under its own power alone, and the solid curve is the indicatrix that results — that same circle carried bodily by exactly the drift arrow. Push the wind outward and the origin walks towards the boundary, which is the bound the next section is about.

The formula follows from that in one step. Travelling in the direction vv takes time FF when the craft’s own velocity, which is v/F−Wv/F - W, has unit hh-length; expanding ∥v/F−W∥h=1\lVert v/F - W \rVert_h = 1 gives the quadratic λF2+2⟨W,v⟩h F−∥v∥h2=0\lambda F^2 + 2\langle W, v\rangle_h\, F - \lVert v \rVert_h^2 = 0 in FF, with λ=1−∥W∥h2\lambda = 1 - \lVert W \rVert_h^2, and FF is its positive root:

F(x,v)=λ∥v∥h2+⟨W,v⟩h2−⟨W,v⟩hλ,F(x,v) = \frac{\sqrt{\lambda \lVert v \rVert_h^2 + \langle W, v \rangle_h^2} - \langle W, v \rangle_h}{\lambda},

which collapses to ∥v∥h\lVert v \rVert_h when the drift is switched off and λ=1\lambda = 1, as it has to. The sign convention is fixed so that a headwind increases the cost.

Why this parametrization and not the affine one

A Randers metric can equally be written down directly as F=α+βF = \alpha + \beta, where α(v)=v⊤a v\alpha(v) = \sqrt{v^\top a\, v} is a Riemannian norm and β(v)=b⊤v\beta(v) = b^\top v is a linear form — the affine form, written (G,B)(G, B) in place of (a,b)(a, b) wherever the code and the eikonal page use it, and the form the eikonal solvers consume. It is an awkward form to hold a metric in while the metric is being fitted, for two reasons. The pair (a,b)(a, b) is admissible only when ∥b∥a−1<1\lVert b \rVert_{a^{-1}} < 1, a condition that couples the two arguments together, so neither can be varied freely while the other is held fixed and an optimiser that adjusts aa may invalidate a bb that was perfectly admissible a step earlier. Neither half carries a meaning on its own, either: aa is not the medium and bb is not the current, but algebraic combinations of both.

The navigation data have neither problem. The medium hh ranges over the symmetric positive definite matrices with nothing further asked of it, the drift WW ranges over the open hh-unit ball, and the one constraint in the theory touches only the second of them. So when the drift is the unknown — a wind to be recovered from observed crossings, a current from drifter tracks — it is a variable being solved for directly, rather than a quantity to be disentangled from (a,b)(a,b) once the fit has finished. Nothing is given up by working this way, since the correspondence between the two descriptions is a bijection and either can be recovered from the other.

Randers therefore stores hh and WW as two callables, h_net and w_net, and derives the affine form at each evaluation. Either may be a neural network.

The bound the drift must respect

The craft has to be able to make headway against the medium. If the drift anywhere matches the craft’s own speed, pointing directly against it produces zero ground velocity. The origin then lies on the translated indicatrix, and the navigation construction no longer defines a smooth, strongly convex norm. The condition ruling that out is

∥W∥h<1,equivalentlyλ>0,\lVert W \rVert_h < 1, \qquad \text{equivalently} \quad \lambda > 0,

which is exactly the strong convexity of FF restated in the navigation data, and so a boundary of the theory rather than of the implementation. It is called the causal bound here and in the code, since what it rules out is a craft carried faster than it can steer. It is also easy to cross by accident, because a network asked to predict a wind field will cross it early in training, long before it has learned anything about the data, and what follows is that every quantity computed downstream no longer has the stated geometric meaning, even if a floating-point result is still produced.

finslerax therefore holds the bound in the parametrization rather than in the loss. The wind a network requests is passed through a smooth, identity-preserving rescaling before it is used, so that any finite output yields a valid metric and the constraint is never a term the data term can outbid. Away from the causal boundary, the change is exponentially small; the formula below makes the approximation error explicit. For a field that is trusted in advance — a measured current already known to satisfy the bound — wind_mode="raw" bypasses this clamp.

  • Expanding the square root above gives the affine form F(x,v)=v⊤G(x) v+B(x)⊤vF(x,v) = \sqrt{v^\top G(x)\, v} + B(x)^\top v with

    G=1λ(h+W♭(W♭)⊤λ),B=−W♭λ,G = \frac{1}{\lambda}\left(h + \frac{W^\flat (W^\flat)^\top}{\lambda}\right), \qquad B = -\frac{W^\flat}{\lambda},

    where W♭=hWW^\flat = hW. This is the form the eikonal solvers use, and the shift BB is what appears in the arrival-time equation on the next page but one.

    The fundamental tensor of FF is positive definite precisely when λ>0\lambda > 0. To enforce it, write r=∥W∥hr = \lVert W \rVert_h and c=1−εc = 1 - \varepsilon. Before numerical guards, the clamp uses the temperature-controlled soft minimum

    φ~(r)=r−1κ softplus(κ(r−c)),φ~′(r)=1−σ(κ(r−c))∈(0,1).\widetilde\varphi(r) = r - \tfrac{1}{\kappa}\,\mathrm{softplus}\big(\kappa(r-c)\big), \qquad \widetilde\varphi'(r) = 1 - \sigma\big(\kappa(r-c)\big) \in (0,1).

    This function is C∞C^\infty, increases towards the strict supremum cc, and differs from the identity by approximately e−κ(c−r)/κe^{-\kappa(c-r)}/\kappa below the shell of width 1/κ1/\kappa around the boundary. The implementation also guards the tiny negative undershoot at the origin and the division by rr:

    s(r)=max⁡{φ~(r),0}max⁡{r,εgrad},Wsafe=s(r)W.s(r)=\frac{\max\{\widetilde\varphi(r),0\}}{\max\{r,\varepsilon_{\mathrm{grad}}\}}, \qquad W_{\mathrm{safe}}=s(r)W.

    These guards are the formula evaluated by causal_wind_scale; away from numerical zero they reduce to the smooth expression above. The stiffness κ\kappa defaults to finslerax.utils.WIND_STIFFNESS.

    The obvious alternative, (1−ε)tanh⁡(r)/r(1-\varepsilon)\tanh(r)/r, also enforces the bound smoothly, but tanh⁡\tanh is strictly concave, so tanh⁡r<r\tanh r < r at every r>0r > 0 and every wind is bent, including all the ones that were already admissible: a requested 0.50.5 comes back as 0.460.46. The distortion is silent, and it falls on exactly the fields that needed no correction.