1 Introduction

The Escape Time \({{\mathrm{D}}}(z)\), from a point \(z\) of the domain \(\Omega \), is the length of the shortest path joining this point to the boundary \(\partial \Omega \). Computing the escape time, and extracting an associated minimal path, is a task of obvious interest in motion planning control problems [2]. Yet this versatile problem has numerous other applications [14], including image classification [11], seismic imaging [15] or the modeling of bio-physical phenomena [13]. We are motivated by medical image segmentation problems, which often involve a strongly anisotropic [3], and potentially asymmetric [7, 19], local measure of path length.

From a theoretical point of view, the Escape Time problem can be reformulated as a static Hamilton-Jacobi, or Anisotropic Eikonal, partial differential equation (PDE) [14]. Its numerical discretization has attracted an important research effort, and includes the Fast Marching algorithm [17], the Fast Sweeping method [16], and their numerous variants [2, 4, 8, 15]. As the “Fast” adjective indicates, performance is a crucial concern: in image processing applications, the discretization domain may contain millions of points (as many as image pixels), and CPU time should remain compatible with user interaction. Last but not least, as mentioned above, state of the art image processing applications involve strongly non-uniform, anisotropic and/or asymmetric measures of path length, which challenges available algorithms [3] and limits the parallelization potential [12].

This paper is devoted the introduction and study of a new algorithm, fast marching using anisotropic stencil refinement (FM-ASR), a numerical solver for the two dimensional Escape Time problem discretized on a cartesian grid. Path length is measured locally through a given arbitrary Finsler metric \(\mathcal{F}\): a continuous map associating to each point \(z\in \Omega \) an asymmetric norm \(\mathcal{F}_z\). The FM-ASR regards the discretization grid as a subset of the Lattice \({Z\!\!Z}^2\), and uses arithmetic tools to produce the local stencils involved in the discretization of the associated partial differential equation (PDE), which results in a huge complexity reduction in comparison with more classical approaches. Note that the FM-LBR [8], previously introduced by the author, shares this approach but is limited to metrics of Riemannian type (elliptic anisotropy). Non-Riemannian metrics arise in applications which take advantage of their potential asymmetry [7, 19], or as the result of the homogenization of smaller scale Riemannian metrics [10]. The anisotropy ratios of an asymmetric norm \(F:\mathbb{R }^2 \rightarrow \mathbb{R }_+\), and of a Finsler metric \(\mathcal{F}: \overline{\Omega }\times \mathbb{R }^2 \rightarrow \mathbb{R }_+\), are defined by

$$\begin{aligned} \kappa (F) := \max _{|u|=|v|=1} \frac{F(u)}{F(v)}, \qquad \kappa (\mathcal{F}) := \sup _{z\in \overline{\Omega }} \kappa (\mathcal{F}_z). \end{aligned}$$
(1)

The average complexity of the FM-ASR only depends (poly-)logarithmically on the anisotropy ratio of the given metric \(\mathcal{F}\), and is quasi-linear in the number \(N\) of discretization points. In contrast, alternative approaches show a polynomial dependence either on \(\kappa (\mathcal{F})\) [2, 15], or on \(N\) [4], a difference clearly apparent in the numerical experiments presented in §5. In average over all grid orientations, and denoting \(\ln ^\alpha x := (\ln x)^\alpha \), the complexity of the FM-ASR is only \(\mathcal O (N \ln ^3 \kappa (\mathcal{F}) + N \ln N)\).

2 Description of the problem, algorithm, and main results

The Escape Time problem is posed on a two dimensional bounded domain \(\Omega \subset \mathbb{R }^2\), equipped with a Finsler metric \(\mathcal{F}\). This metric is a continuous map \(\mathcal{F}: \overline{\Omega }\times \mathbb{R }^2 \rightarrow \mathbb{R }_+,\,(z,u) \mapsto \mathcal{F}_z(u)\), such that for each fixed \(z\in \overline{\Omega }\), the restriction \(u \mapsto \mathcal{F}_z(u)\) is an asymmetric norm (i.e. a proper \(1\)-homogeneous convex functionFootnote 1). The length of a path \(\gamma \in C^1([0,1], \overline{\Omega })\) is measured through the metric \(\mathcal{F}\):

$$\begin{aligned} {{\mathrm{length}}}(\gamma ) := \int \limits _0^1 \mathcal{F}_{\gamma (t)}( \gamma ^{\prime }(t)) \, dt. \end{aligned}$$

Notable special cases include Isotropic metrics: \(\mathcal{F}_z(u) = n(z)\Vert u\Vert \), where the parameter \(n(z)>0\) corresponds to the local index in geometrical optics. Riemannian metrics have the form: \(\mathcal{F}_z(u) := \sqrt{\langle u, \mathcal M (z) u\rangle }\), where \(\mathcal M (z)\) is a symmetric positive definite matrix. Symmetric Finsler metrics are subject to the condition \(\mathcal{F}_z(-u) = \mathcal{F}_z(u)\), for all \(z\in \Omega ,\,u \in \mathbb{R }^2\). See Fig. 1. Here and below we denote by \(\Vert \cdot \Vert \) and \(\langle \cdot ,\cdot \rangle \) the canonical euclidean norm and scalar product on \(\mathbb{R }^2\).

The length of a path \(\gamma \in C^1([0,1], \overline{\Omega })\), and of the reversed path \(\hat{\gamma }: t \mapsto \gamma (1-t)\) may be different in the case of a general asymmetric Finsler metric. This apparent oddity is entirely relevant in the study of motion planning under the influence of wind [2]. It is also essential in minimal path based image segmentation methods [7, 19], where the right and left of the path should have different prescribed characteristics, since they respectively correspond to the foreground and background of the segmented object. We introduce an asymmetric distance \({{\mathrm{D}}}(\cdot , \cdot )\) on \(\overline{\Omega }\)

$$\begin{aligned} {{\mathrm{D}}}(x,y) := \inf \{ {{\mathrm{length}}}(\gamma ); \, \gamma \in C^1([0,1], \overline{\Omega }), \, \gamma (0)=x,\, \gamma (1)=y\}. \end{aligned}$$

The solution of the Escape Time optimal control problem is the distance \({{\mathrm{D}}}(\cdot )\) to the boundary: for all \(x\in \overline{\Omega }\)

$$\begin{aligned} {{\mathrm{D}}}(x) := \min \{{{\mathrm{D}}}(x,y); \, y\in \partial \Omega \}. \end{aligned}$$
(2)

The function \(D\) is also characterized as the unique viscosity solution [6] of the static Hamilton-Jacobi, or Anisotropic Eikonal, PDE (see e.g. [10] for a discussion on this reformulation)

$$\begin{aligned} \left\{ \begin{array}{l@{\quad }l} \mathcal{F}^*_z(-\nabla {{\mathrm{D}}}(z)) = 1 &{} \text {for all } z \in \Omega ,\\ {{\mathrm{D}}}(z) = 0 &{} \text {for all } z\in \partial \Omega . \end{array} \right. \end{aligned}$$
(3)

In the above equation, we denoted by \(F^*\) the dual asymmetric norm of an asymmetric norm \(F\) on \(\mathbb{R }^2\), which is defined for all \(u\in \mathbb{R }^2\) by

$$\begin{aligned} F^*(u) := \max _{v\ne 0} \frac{\langle u,v\rangle }{F(v)}. \end{aligned}$$
(4)

Consider the front defined by \(\mathcal E _t := D^{-1}(\{t\}),\,t \ge 0\), thus \(\mathcal E _0 = \partial \Omega \). The normal to this front, at a point \(z \in \mathcal E _t\) where \({{\mathrm{D}}}\) is differentiable, is positively collinear to \(\nabla {{\mathrm{D}}}(z)\). The speed of the front along in this normal direction is inversely proportional to the gradient euclidean norm, \(1/\Vert \nabla {{\mathrm{D}}}(z)\Vert \), and is thus determined by the identity \(\mathcal{F}_z^*(-\nabla {{\mathrm{D}}}(z)) = 1\). Note that the front may only go forward, and that the front speed cannot depend on global or high order properties of the front, such as its curvature. See [14] for the applications, and limits, of this elementary front propagation model.

Fig. 1
figure 1

A Finsler metric \(\mathcal{F}\), on a domain \(\Omega \subset \mathbb{R }^2\), is the data of a continuously varying asymmetric norm \(\mathcal{F}_z\), at each point \(z\in \overline{\Omega }\). The convex sets \(\{u ; \, \mathcal{F}_z(u) \le 1\}\), at several points \(z\in \Omega \), are used to visualize the metric \(\mathcal{F}\). Finsler metrics can be of Riemannian type (left), symmetric (center), or asymmetric (right). The discretization of the Escape Time problem involves the construction of local stencils, three those produced by the FM-ASR are illustrated

Since \({{\mathrm{D}}}(\cdot , \cdot )\) is a path length (asymmetric) distance, one has for any point \(x\) and neighborhood \(V,\,x\in V \subset \Omega \), the identity

$$\begin{aligned} {{\mathrm{D}}}(x) = \min _{y \in \partial V} {{\mathrm{D}}}(x,y)+{{\mathrm{D}}}(y). \end{aligned}$$
(5)

Indeed, any path \(\gamma \) joining \(x\) to \(\partial \Omega \) must cross \(\partial V\) at least once, at some point \(y\). The discretization of the Escape time problem is based on an approximation of the right hand side of 5, the so-called Hopf-Lax update operator introduced in [5], see also [4, 8, 15], and on a reinterpretation of this equation as a fixed point problem.

For that purpose we introduce discrete sets \(\Omega _*\) and \(\partial \Omega _*\), devoted to the sampling of the continuous domain \(\Omega \) and of its boundary \(\partial \Omega \) respectively. In the FM-ASR, \(\Omega _*\) and \(\partial \Omega _*\) need to be subsets of the grid \({Z\!\!Z}^2\), or of another orthogonal grid obtained by rescaling, rotating and offsetting \({Z\!\!Z}^2\).

A small neighborhood \(V_*(z)\) of each \(z\in \Omega _*\), the stencil, is constructed under the form of a triangulation, of vertices in \(\Omega _* \cup \partial \Omega _*\). See Figs. 1 and 3 for some stencils used in the FM-ASR, and Fig. 2 for more classical examplesFootnote 2. For any discretization point \(x\in \Omega _*\), and any discrete map \({{\mathrm{d}}}: \Omega _* \cup \partial \Omega _* \rightarrow \mathbb{R }_+\), we define the Hopf-Lax update

$$\begin{aligned} \Lambda ({{\mathrm{d}}},x) := \min _{y \in \partial V} \mathcal{F}_x(y-x)+{{\mathrm{\mathrm{I}}}}_{V} {{\mathrm{d}}}(y). \end{aligned}$$
(6)

We denoted by \(V\) the stencil \(V_*(x)\), and by \({{\mathrm{\mathrm{I}}}}_V\) the piecewise linear interpolation operator on this triangulation. Note that \(\Lambda ({{\mathrm{d}}},x)\) does not depend on the value of \({{\mathrm{d}}}(x)\), but only on \({{\mathrm{d}}}(y)\) for points \(y\) of the discrete domain \(\Omega _* \cup \partial \Omega _*\) which lie on the boundary of the stencil \(V=V_*(x)\). In the following we set \(\overline{\mathbb{R }}_+ {:}= {\mathbb{R }}_+ \cup \{+\infty \} = [0, + \infty ]\), adopt the convention \(0 \times \infty =0\), and allow discrete maps to take the value \(+\infty \).

Numerical methods for the Escape Time problem construct a discrete approximation \({{\mathrm{d}}}: \Omega _* \cup \partial \Omega _* \rightarrow \overline{\mathbb{R }}_+\) of the continuous solution \({{\mathrm{D}}}\) of (3), characterized by the following discrete fixed point problem:

$$\begin{aligned} \left\{ \begin{array}{l@{\quad }l} {{\mathrm{d}}}(z) = \Lambda ({{\mathrm{d}}},z) &{} \text {for all } z\in \Omega _*,\\ {{\mathrm{d}}}(z) = 0 &{} \text {for all } z\in \partial \Omega _*. \end{array} \right. \end{aligned}$$
(7)
Fig. 2
figure 2

Stencil used in the classical Fast Marching algorithm (first), the AGSI [4] (second), the FM-8 (third), and the MAOUM [2] at a grid point \(z\in \Omega _*\) when the local anisotropy ratio \(\kappa (\mathcal{F}_z)\) is \(1.5\) or \(6\) (fourth and fifth, respectively). Algorithms compared in §5 to the FM-ASR

Fig. 3
figure 3

Top the mesh \(\mathcal{T}(F)\) constructed for norms \(F\) of anisotropic euclidean type (i.e. \(F(u):=\sqrt{u^\mathrm T M u}\) for some matrix \(M\in S_2^+\)), of anisotropy ratio \(\kappa (F)\) ranging from \(1\) to \(32\) and orientation \(\pi /3\) (top left), or of anisotropy ratio \(\kappa (F)=10\) and orientation ranging from \(\pi /4\) to \(\pi /2\) (right). Bottom likewise for asymmetric norms of the form \(F(u) := \Vert u\Vert -\langle \omega ,u\rangle ,\,u\in \mathbb{R }^2\), of anisotropy ratio ranging from \(4\) to \(400\) and orientation \(\pi /3\) (bottom left), or of anisotropy ratio \(100\) and varying orientations (bottom right)

Note that the distance on a weighted graph obeys a system of equations of similar nature, except that the neighborhoods \(V_*(z)\), of each vertex \(z\), are given by the graph structure and are not dependent on the numerical method. Two well known algorithms can be used to solve this system and evaluate graph distances: the fast, single pass, Dijkstra algorithm, and the slower but more flexible (in that negative edge weights are allowed) Bellman-Ford algorithm. The algorithms used to solve the system (7), associated to the Escape Time problem, are inspired by these two methods, and the lack of negative edge weights in the graph setting is translated into a geometrical property of the stencils, named the Causality Property, see below.

Bellman-Ford inspired algorithms solve the system (7) via Gauss-Siedel iteration: the replacement rule \({{\mathrm{d}}}(z_k) \ {::=}\ \Lambda ({{\mathrm{d}}},z_k),\,k\ge 0\), is applied repeatedly to a mutable map \({{\mathrm{d}}}: \Omega _*\cup \partial \Omega _* \rightarrow \overline{\mathbb{R }}_+\), until a prescribed convergence criterion is met. The map \({{\mathrm{d}}}\) is initialized to \(+\infty \) on \(\Omega _*\), and \(0\) on \(\partial \Omega _*\). The choice of the sequence of points \(z_k \in \Omega _*,\,k \ge 0\), depends on the method. This sequence enumerates the lines and columns of \(\Omega _*\) in the fast sweeping methods [16], and is obtained via a priority queue in the Adaptive Gauss Siedel Iteration (AGSI) [4]. The stencils are usually extremely simple, see Fig. 2, left and center left. The complexity of these methods is linear in \(N := \#(\Omega _*)\) in the special case of an Isotropic metric, \(\mathcal O (\lambda (\mathcal{F}) N)\) for the Fast Sweeping [20], but is polynomial in general, \(\mathcal O (\mu (\mathcal{F})N^{3/2})\) for the AGSI [4]. The constants \(\lambda (\mathcal{F})\) and \(\mu (\mathcal{F})\) depend on global geometrical features of the metric. The AGSI is popular, simple and quite efficient; it appears for reference in our numerical experiments.

We next introduce some geometrical concepts, and the Causality Property which is at the foundation of Dijkstra inspired solvers of the Escape Time problem: the Fast-Marching algorithm [17], and its variants [2, 8, 15]. When satisfied, this property allows to “decouple” and solve the discrete system (7) in a non-iterative, single pass fashion, resulting in a complexity independent of global features of the metric, and quasi-linear in the number \(N\) of unknowns.

Definition 2.1

Let \(F\) be an asymmetric norm on \(\mathbb{R }^2\). We say that two vectors \(u,v\in \mathbb{R }^2\setminus \{0\}\) form an \(F\)-acute angle if

$$\begin{aligned} F(u+\delta v) \ge F(u) \ \text { and } \ F(v+\delta u) \ge F(v) \ \text { for all } \delta \ge 0. \end{aligned}$$
(8)

We say that a finite conforming triangulation \(\mathcal{T}\) is \(F\)-acute if

  1. (i)

    The union of the triangles \(T \in \mathcal{T}\) is a neighborhood of the origin.

  2. (ii)

    The vertices of each \(T\in \mathcal{T}\) lie on \({Z\!\!Z}^2\), one of them is the origin \(0\), and \(T\) has area \(1/2\).

  3. (iii)

    The non-zero vertices of each triangle \(T \in \mathcal{T}\) form an \(F\)-acute angle.

In other words, two vectors form an \(F\)-acute angle if adding a positive multiple of one to the other increases its \(F\) norm. The stencils \(V_*(z)\) of the FM-ASR, at a point \(z\in \Omega _*\), are built from (translated, rescaled, rotated) \(F\)-acute triangulations (10). Condition (i) heuristically ensures that information is propagated in all directions in (7). Condition (ii) ensures that this information stays on the grid \(\Omega _*\). In addition, this condition implies that a triangle \(T\in \mathcal{T}\) does not contain any point of \({Z\!\!Z}^2\) except its vertices, which heuristically ensures that information does not “jump over” a subset of \(\Omega _*\).

The core of this paper is devoted to the construction and study of an \(F\)-acute mesh \(\mathcal{T}(F)\), defined for each asymmetric norm \(F\), see Figs. 1, 3, and used to assemble the stencils of the FM-ASR. This mesh is produced by the following algorithm.

figure a

We assume in the following that the discrete domain \(\Omega _*\) is defined as the intersection \(\Omega _* := \Omega \cap \mathcal{Z}_*\) of the continuous domain \(\Omega \) with a grid \(\mathcal{Z}_*\) of the form

$$\begin{aligned} \mathcal{Z}_* := h R_\theta (u+{Z\!\!Z}^2) = \{ h R_\theta (u+x); \, x \in {Z\!\!Z}^2\}. \end{aligned}$$
(9)

This grid is defined through a scale parameter \(h>0\), a rotation \(R_\theta \) of angle \(\theta \in \mathbb{R }\), and an offset \(u\in \mathbb{R }^2\). In practical applications, one generally chooses for simplicity \(\theta =0\) and \(u=0\) (this is the case of all illustrations of this paper). The complexity of the FM-ASR may however show, for some untypical Finsler metrics, a strong dependence on the parameters \(\theta \) and \(u\). Hence there is a significant difference between the worst case complexity of the FM-ASR, and the average case complexity over randomized grid orientations \(\theta \in [0,2 \pi ]\) and offsets \(u\in [0,1]^2\), see below.

The stencil \(V_*(z),\,z\in \Omega _*\), assembled in the Preprocessing of the FM-ASR , and involved in (7), is defined by rotating, rescaling and offsetting the mesh \(\mathcal{T}(\mathcal{F}_z \circ R_\theta )\): with obvious notations

$$\begin{aligned} V_*(z) := z+h R_\theta \,\mathcal{T}(\mathcal{F}_z \circ R_\theta ). \end{aligned}$$
(10)

These stencils have a fine angular resolution in the direction of anisotropy, and a coarser one in other directions, see Fig. 1. This distinctive property justifies the name of our algorithm: Fast Marching using Anisotropic Stencil Refinement (FM-ASR).

figure b

The vertices \(v\) of the mesh \(\mathcal{T}(F)\), associated to an asymmetric norm \(F\), are bounded in terms of the anisotropy ratio: \(\Vert v\Vert \le 2 \kappa (F)\) (see Proposition 3.9 below). Hence the discrete boundary \(\partial \Omega _*\), produced by the FM-ASR initialization, may contain grid points at distance \(2 h\, \kappa (\mathcal{F})\) from the domain \(\Omega \). This is not an issue in the case of the null boundary condition (3), (7), chosen in our presentation, or of a point source problem (the most common case in applications, see §5). However, if the boundary condition is non-trivial, then its extension from the boundary \(\partial \Omega \) to the wider discrete set \(\partial \Omega _*\) is required by the FM-ASR.

The next lemma gives a simple characterization of \(F\)-acuteness when the asymmetric norm \(F\) is differentiable or of anisotropic euclidean type (i.e. defined by a symmetric positive definite matrix). The characterization 11, for smooth norms, was introduced in [18] in the same context. We denote by \(S_2^+\) the collection of \(2\times 2\) symmetric positive definite matrices.

Lemma 2.2

Let \(F\) be an asymmetric norm on \(\mathbb{R }^2\), and let \(u,v\in \mathbb{R }^2 \setminus \{0\}\).

  1. 1.

    If \(F\) is differentiable at \(u,v\), then these vectors form an \(F\)-acute angle if and only if

    $$\begin{aligned} \langle u,\nabla F(v)\rangle \ge 0 \ \text { and } \ \langle v,\nabla F(u)\rangle \ge 0. \end{aligned}$$
    (11)
  2. 2.

    If these exists \(M\in S_2^+\) such that \(F(w) = \sqrt{\langle w,M w\rangle }\), for all \(w\in \mathbb{R }^2\), then \(u,v\) form an \(F\)-acute angle if and only if

    $$\begin{aligned} \langle u,M v\rangle \ge 0. \end{aligned}$$
    (12)

Proof

We first establish Point 1. We have the Taylor development \(F(u+\delta v) = F(u)+ \delta \langle v, \nabla F(u)\rangle + o(\delta )\) as \(\delta \rightarrow 0\), and likewise exchanging the roles of \(u\) and \(v\). Thus 8 clearly implies 11. Conversely the function \(F\), being convex, is above its tangent maps, hence \(F(u+\delta v) \ge F(u) + \delta \langle v, \nabla F(u)\rangle \) for all \(\delta \in \mathbb{R }\), and likewise exchanging the roles of \(u\) and \(v\). Thus 11 implies 8, which concludes the proof of Point 1.

Point 2 immediately follows from the following expansion: for any \(u,v \in \mathbb{R }^2,\,\delta \in \mathbb{R }\), one has

$$\begin{aligned} F(u+\delta v)^2 = F(u)^2+2\delta \langle u,M v\rangle + \delta ^2 F(v)^2. \end{aligned}$$

\(\square \)

If \(F\) is the canonical euclidean norm, then \(F\)-acuteness coincides with the standard notion of acuteness (apply (12) to \(M:={{\mathrm{Id}}}\)). The following proposition, or a close variant [15, 17], is at the foundation of all Dijkstra inspired methods. The positivity of the differences \(d_w-d_u,\,d_w-d_v\), is a substitute for the positivity of the edge weights in the classical Dijkstra algorithm.

Proposition 2.3

(Causality Property) Let \(F\) be an asymmetric norm on \(\mathbb{R }^2\), let \(u,v \in \mathbb{R }^2\) be linearly independent, and let \(d_u, d_v \in \mathbb{R }\). Assume that \(u\) and \(v\) form an \(F\)-acute angle. Define

$$\begin{aligned} d_w := \min _{t \in [0,1]} t d_u+(1-t) d_v + F(t u+(1-t) v), \end{aligned}$$
(13)

and assume that this minimum is not attained for \(t\in \{0,1\}\). Then \(d_u<d_w\) and \(d_v<d_w\).

Proof

See appendix. \(\square \)

In order to describe the Execution of the FM-ASR, see algorithm page , we introduce a variant of the Hopf-Lax update (6), which uses two additional variables: a boolean map \(b:\Omega _* \rightarrow \{trial, accepted\}\), and a grid point \(y\in \Omega _*\).

$$\begin{aligned} \Lambda ({{\mathrm{d}}}, x; \, b,y) := \min _{x^{\prime } \in \Gamma } \mathcal{F}(x^{\prime }-x) + {{\mathrm{\mathrm{I}}}}_V {{\mathrm{d}}}(x^{\prime }), \end{aligned}$$
(14)

where \(V:=V_*(x)\), and \(\Gamma \) denotes union of the vertex \(y\), and the (at most two) segments \([y,z]\) of \(\partial V\) containing \(y\) and another vertex \(z\) of \(V\) such that \(b(z) = accepted\). The second part of the FM-ASR, Execution, is common to the original Fast-Marching algorithm [17] and its variants [2, 8]. The fact that it solves the discrete fixed point problem (7) follows from the Causality Property, see [8, 17] for a proof.

figure c

For each step size \(h>0\), consider the discrete domain \(\Omega _h := \Omega \cap (h {Z\!\!Z}^2)\), and the associated solution \({{\mathrm{d}}}_h\) of the system (7) produced by the FM-ASR. A proof of uniform convergence of the discrete maps \(({{\mathrm{d}}}_h)_{h>0}\) towards the solution \({{\mathrm{D}}}\) of the continuous Escape Time problem,

$$\begin{aligned} \lim _{h \rightarrow 0} \left( \max _{z\in \Omega _h} | {{\mathrm{D}}}(z) - {{\mathrm{d}}}_h(z)|\right) , \end{aligned}$$

is presented in [8] for the FM-LBR, a closely related algorithm, in the special case where \(\Omega = [-1/2,1/2]^2\setminus \{(0,0)\}\), and where periodic boundary conditions are applied to the external boundary of \(\Omega \) (Equivalently \(\Omega = \mathbb{R }^2\setminus {Z\!\!Z}^2\) and the metric is periodic: \(\mathcal{F}_z = \mathcal{F}_{z+u}\) for all \(u \in {Z\!\!Z}^2\)). The adaptation of this proof to the FM-ASR is straightforwardFootnote 3, and is not reproduced here.

The rest of this introduction, and of this paper, is devoted to estimating the complexity of the FM-ASR. Unsurprisingly, this complexity is tied to the cardinality of the FM-ASR stencils, and thus to the cardinality of the \(F\)-acute meshes \(\mathcal{T}(F)\) used to define them. The next proposition provides an uniform upper bound on \(\#(\mathcal{T}(F))\), in terms of the anisotropy ratio \(\kappa (F)\) of the given asymmetric norm \(F\). This first, coarse estimate is however not much satisfying: mesh cardinality grows (quasi-)linearly with the anisotropy ratio, and our anisotropic construction of \(F\)-acute meshes \(\mathcal{T}(F)\) has little advantage over an isotropic one \(\mathcal{T}_{\kappa (F)}\), depending only on the anisotropy ratio.

Proposition 2.4

There exists a constant \(C\), such that the following holds. For any asymmetric norm \(F\) on \(\mathbb{R }^2\) one has:

$$\begin{aligned} \#(\mathcal{T}(F)) \le C\kappa (F) (1+\ln \kappa (F)). \end{aligned}$$
(15)

A slightly sharper estimate holds if \(F\) is symmetric:

$$\begin{aligned} \#(\mathcal{T}(F)) \le C\kappa (F). \end{aligned}$$
(16)

For any \(\kappa \ge 1\), there exists a mesh \(\mathcal{T}_\kappa \) which is \(F\)-acute for any asymmetric norm such that \(\kappa (F)\le \kappa \), and has cardinality \(\#(\mathcal{T}_\kappa ) \le C \kappa (1+\ln \kappa )\).There also exists an anisotropic euclidean norm \(F_\kappa \) such that \(\kappa (F) \le \kappa \) and \(\#(\mathcal{T}(F_\kappa )) \ge \kappa /C\).

The following theorem is our main result: it establishes that the cardinality of \(\mathcal{T}(F)\) grows only (poly-)logarithmically with the anisotropy of \(F\), in an average sense over all orientations. The difference between the uniform and the average cardinality bounds, Proposition 2.4 and Theorem 2.5 respecticely, reflects the fact, illustrated on Fig. 4, that the cardinality of \(\mathcal{T}(F)\) strongly depends on the orientation of the anisotropy of \(F\). For each \(\theta \in \mathbb{R }\) we define the rotated asymmetric norm \(F^{\theta }\) by

$$\begin{aligned} F^{\theta }(u) := F(R_\theta ^\mathrm T u), \end{aligned}$$

where \(u\in \mathbb{R }^2\) and \(R_\theta \) denotes the rotation matrix of angle \(\theta \), see Fig. 4.

Fig. 4
figure 4

The unit ball of \(F^{\theta }\) is the unit ball of \(F\) rotated by the angle \(\theta \) (left). Here the norm \(F\), of anisotropic euclidean type, is given by the diagonal matrix of entries \((\kappa ,1/\kappa )\), with \(\kappa =4\) (left), \(\kappa =100\) (center, linear plot) and \(\kappa = e^8\) (right, log plot). In this example, the cardinality of \(\mathcal{T}(F^{\theta })\) is highly dependent on the angle \(\theta \), and seems to spike when \((\cos \theta , \sin \theta )\) is close to be proportional to a vector with small integer coordinates

Theorem 2.5

There exists a constant \(C\), such that for any asymmetric norm \(F\) on \(\mathbb{R }^2\), one has:

$$\begin{aligned} \int \limits _0^{2 \pi } \#(\mathcal{T}(F^{\theta })) \, d\theta \le C (1+\ln ^3 \kappa (F)) \end{aligned}$$
(17)

A slightly sharper estimate holds if \(F\) is symmetric:

$$\begin{aligned} \int \limits _0^{2 \pi } \#(\mathcal{T}(F^{\theta })) \, d\theta \le C(1+\ln ^2 \kappa (F)). \end{aligned}$$
(18)

We next use Proposition 2.4 and Theorem 2.5 to obtain worst case and average case complexity estimates for the FM-ASR. For that purpose, we fix the bounded smooth domain \(\Omega \subset \mathbb{R }^2\), and the scale parameter \(h>0\). For each angle \(\theta \in \mathbb{R }\), and offset \(u\in \mathbb{R }^2\), we introduce the grid

$$\begin{aligned} \mathcal{Z}_{\theta , u} := h R_\theta ^\mathrm T (u+ {Z\!\!Z}^2). \end{aligned}$$

In the rest of this introduction, the subscript \(*\), used above to denote discrete entities, is replaced with the grid parameters \((\theta ,u)\). The discrete domain is thus denoted by \(\Omega _{\theta ,u} := \Omega \cap \mathcal{Z}_{\theta , u}\), the discrete boundary by \(\partial \Omega _{\theta ,u}\), and the stencils by \(V_{\theta ,u}(z),\,z\in \Omega _{\theta ,u}\). Like other Dijkstra-inspired solvers of the Escape Time problem, see Remark 2.7, the complexity of the FM-ASR is given by

$$\begin{aligned} \mathcal O (N\ln N + N^{\prime }_{\theta ,u}), \end{aligned}$$
(19)

where \(N\) denotes the total number of discrete points, and \(N^{\prime }_{\theta ,u}\) the sum of the stencil cardinalities.

$$\begin{aligned} N := \#(\Omega _{\theta ,u} \cup \partial \Omega _{\theta ,u}), \qquad N^{\prime }_{\theta ,u} := \sum _{z\in \Omega _{\theta ,u}} \#(V_{\theta ,u}(z)) = \sum _{z \in \Omega _{\theta ,u}} \#(\mathcal{T}(\mathcal{F}_z^{\theta })). \end{aligned}$$

The discrete domain cardinality \(N\) is mostly independent of the grid orientation parameters \(\theta , u\) (this is why we write \(N\) and not \(N_{\theta ,u}\)): if the scale parameter \(h\) is sufficiently small, then

$$\begin{aligned} N \simeq |\Omega | h^{-2}. \end{aligned}$$
(20)

Proposition 2.4 implies a worst case upper bound for \(N^{\prime }_{\theta ,u}\):

$$\begin{aligned} N^{\prime }_{\theta ,u} \le \#(\Omega _{\theta ,u}) \,\max _{z \in \Omega } \#(\mathcal{T}(\mathcal{F}_z^\theta )) \le N \kappa (\mathcal{F})(1+ \ln \kappa (\mathcal{F})). \end{aligned}$$
(21)

Let \(N^{\prime }\) be the average value of \(N^{\prime }_{\theta ,u}\), over the collection of grid orientation parameters \((\theta , u)\in [0,2\pi ] \times [0,1]^2\). This average value is, as expected, much smaller than the above uniform upper bound:

$$\begin{aligned} 2 \pi N^{\prime }&:= \int \limits _0^{2\pi } \int \limits _{[0,1[^2} N^{\prime }_{\theta ,u}\, du \, d \theta \\&= \int \limits _0^{2\pi } \int \limits _{[0,1[^2} \sum _{z \in \Omega _{\theta ,u}} \#(\mathcal{T}(\mathcal{F}_z^{\theta })) \, du \, d \theta \\&= h^{-2}\int \limits _0^{2 \pi } \int \limits _{z \in \Omega } \#(\mathcal{T}(\mathcal{F}_z^\theta )) \, dz\, d \theta \\&\le C h^{-2} \int \limits _{z \in \Omega } (1+\ln ^3 \kappa (\mathcal{F}_z)) dz,\\&\le C \, |\Omega | h^{-2}\, (1+\ln ^3 \kappa (\mathcal{F})). \end{aligned}$$

Thus, using (20)

$$\begin{aligned} N^{\prime } \lesssim C N (1+\ln ^3 \kappa (\mathcal{F})). \end{aligned}$$
(22)

Combining (19) with (21) and (22), we obtain that the worst case complexity of the FM-ASR is \(\mathcal O (N \kappa (\mathcal{F}) \ln \kappa (\mathcal{F}) + N \ln N)\), while the average case complexityFootnote 4, over randomized grid orientation parameters \((\theta ,u)\), is \(\mathcal O (N \ln ^3 \kappa (\mathcal{F}) + N \ln N)\). The worst case complexity corresponds to untypical cases where e.g. the Finsler metric has a preferred anisotropy direction over a large portion of the domain, and the discretization grid is almost aligned with this direction; the average case complexity is more likely to reflect application performance.

The FM-ASR average complexity \(\mathcal O (N \ln ^3 \kappa (\mathcal{F}) + N \ln N)\) is significantly below that of Bellman-Ford inspired algorithms, such as the AGSI [4] of complexity \(\mathcal O (\lambda (\mathcal{F}) N^{3/2})\), thanks to the quasi-linear complexity in \(N\). Alternative Dijkstra inspired solvers include the Ordered Upwind Method (OUM) [15] (which uses dynamic stencils, constructed on the fly during the execution), and the Monotone Acceptance OUM (MAOUM) [2]. They use stencils larger than those of the FM-ASR, of cardinality between \(\kappa (\mathcal{F})\) and \(\kappa (\mathcal{F})^2\), which results in a complexity linear if not polynomial in the anisotropy ratio: \(\mathcal O (\kappa (\mathcal{F})^\beta N \ln N)\) [2, 15], for someFootnote 5 \(\beta \in [1,2]\). In defense of the AGSI, OUM and MAOUM, let us mention that these alternative algorithms are not limited to grid discretizations, contrary to the FM-ASR, see Remark 2.6. Fast Marching using Lattice Basis Reduction (FM-LBR), introduced in [8] by the author, has like the FM-ASR a complexity \(\mathcal O (N \ln \kappa (\mathcal{F})+N \ln N)\) logarithmic in the metric anisotropy and quasi linear in the number of unknowns. Yet the application range of the FM-LBR is different: it extends to dimension 3, and 4 [9], but only applies to metrics of Riemannian type. A numerical comparison of the FM-ASR with the AGSI, the MAOUM, the FM-8 (a fast but not always convergent alternative) and the FM-LBR (when applicable), is presented in §5.

We discuss in §3 the construction of the \(F\)-acute mesh \(\mathcal{T}(F)\), for any asymmetric norm \(F\). Section §4 is devoted to the proof of our main result Theorem 2.5, achieved in Corollaries 4.10 and 4.13. The proof of the worst case analysis, Proposition 2.4, is achieved in Corollaries 3.10 and 4.10. We present some numerical results in §5.

Remark 2.6

(Performance comes at the price of specialization) The FM-ASR, introduced in this paper, is an efficient method to solve strongly anisotropic and/or asymmetric Escape Time problems when the discrete domain \(\Omega _*\) is a subset of \({Z\!\!Z}^2\), or of another orthogonal grid. Extending this algorithm to a broader class of discrete domains requires to generalize the construction of the stencils \(V(z)\), \(z\in \Omega _*\). In particular one must find an analog of the rule “if \(u,v\in {Z\!\!Z}^2\) do not form an \(\mathcal{F}_z\)-acute angle, then consider their sum \(u+v \in {Z\!\!Z}^2\)” which appears implicitly in the construction of the mesh \(\mathcal{T}(\mathcal{F}_z)\), algorithm page , and thus of \(V(z)\) 10. This is non-trivial.

  • If the discrete domain \(\Omega _*\), two dimensional, is not a grid subset. The points \(u,v\) do not belong to a lattice, but are differences \(u=x-z,\,v=y-z\), between the point \(z\) where the stencil is constructed, and close-by discrete points \(x,y\in \Omega _*\). The new inserted stencil vertex \(z^{\prime }\) cannot be obtained as the sum \(z+u+v = x+y-z\), which may not belong to \(\Omega _*\). Instead, \(z^{\prime }\) should be chosen as the point closest to \(z\) in the open cone \(z+\mathbb{R }_+^* u+\mathbb{R }_+^*v\), where \(\mathbb{R }_+^*\) denotes positive reals. However, it is not clear wether data structures exist, for the discrete domain \(\Omega _*\), which allow to perform this closest point search without strongly increasing the complexity of the FM-ASR.

  • If the domain is three dimensional, and \(\Omega _*\) is a subset of \({Z\!\!Z}^3\). There are now three points \(u,v,w\in {Z\!\!Z}^3\), vertices of a facet of the stencil boundary \(\partial V\). The extension of the Causality Property, Proposition 2.3, to the case of an arbitrary asymmetric norm \(F: \mathbb{R }^3 \rightarrow \mathbb{R }_+\), requires not only the pairs of vertices \((u,v),\,(u,w),\,(v,w)\) to form \(F\)-acute angles, but also all the pairs of a vertex and a point of the opposite edge: \((u,\, t v+(1-t)w),\,t\in [0,1]\), and likewise exchanging the roles of \(u,v,w\). This can be be difficult to check numerically. In the case of a Riemannian metric, checking \(F\)-acuteness for pairs of vertices is sufficient [8, 15], but there remains an ambiguity: should the new inserted vertex be \(u+v\) or \(u+w\), if none of the corresponding angles is \(F\)-acute? Our attempts to generalize the FM-ASR to this setting were unconvincing, both experimentally and theoretically, hence we recommend the FM-LBR [8] for such 3d, Riemannian, Escape Time problems.

Remark 2.7

(Detailled complexity analysis of the FM-ASR) Preprocessing step, page . We omit the complexity of the construction of the discrete domain \(\Omega _*\) as the intersection of the continuous domain with a grid, since this is either trivial or dependent on the chosen representation of \(\Omega \). Consider an asymmetric norm \(F\) such that answering the predicate “\(u,v\) form an \(F\)-acute angle” has cost \(\mathcal O (1)\), for any \(u,v\in \mathbb{R }^2\). That is the case is \(F\) is differentiable, and if evaluating the gradient \(\nabla F (u)\) has cost \(\mathcal O (1)\), using Lemma 2.2. Then constructing the \(F\)-acute mesh \(\mathcal{T}(F)\) has cost \(\mathcal O (\#(\mathcal{T}(F)))\), where \(\#(\mathcal{T}(F))\) denotes the number of triangles in the triangulation \(\mathcal{T}(F)\), which is also the number of its boundary vertices. As a result, assembling the stencils of the FM-ASR has cost \(\mathcal O (N^{\prime })\), where \(N^{\prime } = N^{\prime }(\Omega _*, \mathcal{F})\) is the sum of the stencil cardinalities

$$\begin{aligned} N^{\prime } := \sum _{z\in \Omega _*} \#(V_*(z)). \end{aligned}$$

Assembling the reversed stencils \(V^*(z),\,z\in \Omega _*\), is done by reversing a directed graph having \(N^{\prime }\) edges, and thus also has cost \(\mathcal O (N^{\prime })\). Note that \(N^{\prime }\) is also the sum of the cardinalities of the reversed stencils. Storing these stencils leads to a \(\mathcal O (N^{\prime })\) memory footprint for the FM-ASR, which is not required by e.g. the AGSI [4], see Remark 2.5 in [8] for a discussion of this point. The total complexity of the FM-ASR Preprocessing is thus \(\mathcal O (N^{\prime })\).

Execution step, page . Let \(N := \#(\Omega _* \cup \partial \Omega _*)\) be the cardinality of the discrete domain, which is also the number of unknowns in (7). The execution requires to maintain a list of the points in \(\Omega _* \cup \partial \Omega _*\) such that \(b(z)=trial\), sorted by increasing values of \({{\mathrm{d}}}\). We assume in this complexity analysis that the data structure used for this purpose is a Fibonacci Heap, in such way that the “Remove_Key” and the “Decrease_Key” operations on this list have respective amortized complexity \(\mathcal O (\ln N)\) and \(\mathcal O (1)\). The “Remove_Key” routine is called \(N\) times, once a each command \(b(y)\ {::=}\ accepted\), and the “Decrease_Key” routine at most \(N^{\prime }\) timesFootnote 6, once at each command \({{\mathrm{d}}}(x) \ {::=}\ \min \{{{\mathrm{d}}}(x),\, \Lambda ({{\mathrm{d}}},x; \, b,y)\}\). Evaluating the modified Hopf-Lax update operator \(\Lambda ({{\mathrm{d}}},x; \, b,y)\) requires to solve at most two convex minimization problems of the form (13): one for each boundary edge \([y,z]\) of \(V_*(x)\) containing \(y\) and a vertex \(z\) such that \(b(z)=accepted\) (14). The complexity of their resolution is regarded as elementary; in many interesting cases, they have an explicit solution involving \(\mathcal O (1)\) elementary operations (\(+,-,\times ,/\) and \(\sqrt{\cdot }\)) among reals, see Proposition (5.1). Like other Dijkstra inspired algorithms, the total cost of the FM-ASR execution is thus \(\mathcal O (N^{\prime }+N\ln N)\).

3 Construction of the stencils

We discuss in this section the construction of the \(F\)-reduced mesh \(\mathcal{T}(F)\), defined for each asymmetric norm \(F\), and used to define the stencils of the FM-ASR 10. The construction presented in the introduction is reformulated as an in-order transversal of four binary trees. We establish a worst case upper bound on \(\#(\mathcal{T}(F))\) in Corollary 3.10, and we introduce a number of tools that will be used in §4 to estimate the average cardinality of \(\mathcal{T}(F^{\theta }),\,\theta \in [0,2\pi ]\).

3.1 Mesh generation by recursive refinement

All the triangles considered in the rest of this paper share some properties of geometric nature (or arithmetic nature, depending on the point of view), which are introduced in the next definition.

Definition 3.1

An elementary triangle \(T\), is a triangle satisfying the following properties:

  • One of the vertices of \(T\) is the origin \((0,0)\), and the the other two belong to \({Z\!\!Z}^2\).

  • Denoting by \(u,v\) the non-zero vertices of \(T\), one has

    $$\begin{aligned} |\det (u,v)|=1 \ \text { and } \ s(T):=\langle u,v\rangle \ge 0. \end{aligned}$$
    (23)

The second point of this definition can be rephrased as a geometrical statement:\(T\) has area \(1/2\), and has an acute angle at the origin. Let us recall that for any two vectors \(u,v\in \mathbb{R }^2\) one has the identity

$$\begin{aligned} \langle u,v\rangle ^2+\det (u,v)^2 = \Vert u\Vert ^2 \Vert v\Vert ^2. \end{aligned}$$
(24)

If \(u,v\) are non-zero, and if \(u\) and \(-v\) are not positively collinear, we denote by their oriented angle:

(25)

The scalar product \(s(T)\) associated to an elementary triangle \(T\) reflects its thinness, indeed if \(u,v\) are its non-zero vertices then combining (23), (24) and (25) we obtain

(26)

We introduce in the next definition the refinement of an elementary triangle \(T\), which is illustrated on Fig. 5 (left). Note that \(T\) is strictly covered by the union of its children.

Fig. 5
figure 5

Refinement of a triangle (left). Mesh \(\mathcal{T}_0\) (center left). First levels of the binary tree (center right) defined by the recursive refinements of \(T_1\). Mesh defined by the ASC: “\(s(T)\ge 5\)” (right)

Definition 3.2

The refinement of an elementary triangle \(T\) of non-zero vertices \(u,v\) consists of the two elementary triangles \(T^{\prime }\) and \(T^{\prime \prime }\) of non-zero vertices \((u, u+v)\), and \((u+v, v)\), respectively, which are referred to as its children.

The scalar product \(s(\cdot )\) grows with refinement:

$$\begin{aligned} s(T^{\prime }) = \langle u,u+v\rangle = S(T) + \Vert u\Vert ^2 \ge S(T)+1. \end{aligned}$$
(27)

This property, combined with (26) reflects the fact that the recursive children of an elementary triangle become thinner an thinner, as can be observed on Fig. 5 (center right).

We denote by \(\mathcal{T}_0\) the mesh, illustrated on Fig. 5, containing the four elementary triangles of non-zero vertices \((\pm 1,0)\) and \((0,\pm 1)\). The next lemma establishes that any elementary triangle can be generated by recursive bisections from an element of \(\mathcal{T}_0\).

Lemma 3.3

  1. 1.

    Let \(T\) be an elementary triangle, of non-zero vertices \(u\) and \(v\). The following are equivalent : (i) \(T \in \mathcal{T}_0\), (ii) \(\Vert u\Vert =\Vert v\Vert \), (iii) \(\langle u,v\rangle < \min \{\Vert u\Vert ^2,\Vert v\Vert ^2\}\).

  2. 2.

    The collection of elementary triangles, equipped with parent-children relationship, is a forest of four infinite binary trees, which roots are the elements of \(\mathcal{T}_0\).

Proof

Point 1. We clearly have \((i) \Rightarrow (ii)\), by inspection of the four elements of \(\mathcal{T}_0\), and \((ii) \Rightarrow (iii)\), by observing that \(u\) and \(v\) are not collinear and thus that \(\langle u,v\rangle < \Vert u\Vert \Vert v\Vert \). We next assume \((iii)\) and establish \((i)\). We have

$$\begin{aligned} \langle u,v\rangle ^2 < \min \{\Vert u\Vert ^2, \Vert v\Vert ^2\}^2 \le \Vert u\Vert ^2 \Vert v\Vert ^2 = \langle u,v\rangle ^2+ \det (u,v)^2 = \langle u,v\rangle ^2+1. \end{aligned}$$

Comparing the left and right hand side, and observing that the members of these inequalities are all integers, we obtain that the non-strict inequality above is an equality. Hence \(\Vert u\Vert = \Vert v\Vert \) and \((\Vert u\Vert ^2)^2 = \langle u,v\rangle ^2+1\). Therefore \(\langle u,v\rangle ^2\) and \((\Vert u\Vert ^2)^2\) are consecutive integers which are both perfect squares. Only the integers \(0\) and \(1\) satisfy this property, hence \(1=\Vert u\Vert =\Vert v\Vert \), which implies that these vectors are of the form \((\pm 1,0)\) or \((0, \pm 1)\). Since \(|\det (u,v)|=1\), these vectors are not collinear, and we obtain that \(T \in \mathcal{T}_0\), which concludes the proof of the first point of this lemma.

Point 2. It follows from (27) that a triangle \(T \in \mathcal{T}_0\) cannot have a parent \(R\), since it would satisfy \(s(R) < s(T) = 0\). More generally, and for the same reason, an elementary triangle \(T\) has at most \(s(T)\) ancestors.

In order to conclude the proof, we need to show that any elementary triangle \(T\), which is not in \(\mathcal{T}_0\), has exactly one parent \(R\). Let \(u,v\) be the non-zero vertices of \(T\), ordered in such way that \(\Vert u\Vert \le \Vert v\Vert \). The non-zero vertices of a parent \(R\) are either \((u-v,v)\) or \((u,v-u)\), but the first case can be excluded since \(\langle u-v,v\rangle = \langle u,v\rangle - \Vert v\Vert ^2 < \Vert u\Vert \Vert v\Vert - \Vert v\Vert ^2 \le 0\). Conversely, the triangle \(R\) which vertices are the origin, \(u\) and \(v-u\), is an elementary triangle since \(\det (u,v-u) = \det (u,v) = \pm 1\), and \(\langle u,v-u\rangle = \langle u,v\rangle - \Vert u\Vert ^2 \ge 0\). \(\square \)

If a mesh \(\mathcal{T}\) contains only elementary triangles, then it automatically satisfies assumption (ii) of Definition 2.1, and so does any mesh \(\mathcal{T}^{\prime }\) obtained by refining, possibly recursively, some elements of \(\mathcal{T}\). If the mesh \(\mathcal{T}\) satisfies assumption (i) of Definition 2.1, namely that the union of its elements is a neighborhood of the origin, then so does \(\mathcal{T}^{\prime }\). The mesh constructions proposed in this paper consist in recursively refining the elements of the mesh \(\mathcal{T}_0\), defined above and fixed in the rest of this paper, until all of them satisfy a prescribed stopping criterion, see Figs. 6 and 7.

Fig. 6
figure 6

Unit ball of an asymmetric norm \(F\) of anisotropy ratio \(\kappa (F)=20\) (top left). Generation of \(\mathcal{T}(p_F)\) by recursive bisection (bottom, leftto right). The non-zero vertices of colored triangles do not form an \(F\)-acute angle, hence these triangles are refined. Colored triangles constitute the set \(\mathcal E (p_F)\), see Definition 3.5; they form the inner nodes of four finite binary trees of triangles, while the elements of \(\mathcal{T}(p_F)\) are the leaves

Fig. 7
figure 7

Unit ball \(\{u; \, F(u) \le 1\}\) of a norm \(F\) given by a positive definite matrix \(M\), of anisotropy ratio \(\kappa (F)=8\) (left). Eigenspace associated to the small eigenvalue of \(M\) (dotted line). Generation of \(\mathcal{T}(F)\) by recursive bisection (second left to right). All refined triangles (colored) contain an eigenvector associated to the small eigenvalue of \(M\) in their interior

Definition 3.4

An Admissible Stopping Criterion (ASC) is a predicate \(p\) which associates to each elementary triangle \(T\) a boolean value \(p(T)\), and which satisfies the following properties:

  • (Heredity) Let \(T^{\prime },T^{\prime \prime }\) be the children of an elementary triangle \(T\). If \(p(T)\) holds, then \(p(T^{\prime })\) and \(p(T^{\prime \prime })\) also hold.

  • (Finiteness) There exists a constant \(s_p\ge 0\) such that \(p(T)\) holds for any elementary triangle \(T\) satisfying \(s(T) \ge s_p\).

The conjunction \(p\wedge p^{\prime }\) and the disjunction \(p \vee p^{\prime }\) of two ASCs \(p,p^{\prime }\) are clearly also ASCs. We write \(p\Rightarrow p^{\prime }\) if \(p(T) \Rightarrow p^{\prime }(T)\) for any elementary triangle \(T\).

Definition 3.5

Let \(p\) be an ASC. We denote by \(\mathcal{T}(p)\) the collection of triangles obtained by recursively refining (i.e. replacing with their children) the elements of \(\mathcal{T}_0\), until each satisfies the predicate \(p\). We denote by \(\mathcal E (p)\) the collection of all elementary triangles which do not satisfy \(p\).

Definition 3.4 of an ASC \(p\) is tailored so that the set \(\mathcal E (p)\) can be identified with four finite binary trees, which are subtrees of the four infinite binary trees of elementary triangles introduced in Point 2 of Lemma 3.3. The triangulation \(\mathcal{T}(p)\) consists of the outer leaves of these trees: \(\mathcal{T}(p)\cap \mathcal E (p) = \emptyset \), but each triangle \(T \in \mathcal{T}(p)\) is the child of an element \(R \in \mathcal E (p)\). This is the main ingredient in the proof of following proposition.

Proposition 3.6

  1. 1.

    The recursive procedure described in Definition 3.5 ends after a finite number of steps, and yields a mesh \(\mathcal{T}(p)\) which satisfies assumptions (i) and (ii) of Definition 2.1. Furthermore

    $$\begin{aligned} \#(\mathcal{T}(p)) = 4+\#(\mathcal E (p)). \end{aligned}$$
    (28)
  2. 2.

    If two ASCs \(p,p^{\prime }\) are such that \(p\Rightarrow p^{\prime }\), then \(\#(\mathcal{T}(p)) \ge \#(\mathcal{T}(p^{\prime }))\).

  3. 3.

    For any two ASCs \(p,p^{\prime }\), one has \(\#(\mathcal{T}(p \wedge p^{\prime })) \le \#(\mathcal{T}(p)) + \#(\mathcal{T}(p^{\prime }))\).

Proof

We denote by \((T_i)_{1 \le i \le 4}\) the four elements of the mesh \(\mathcal{T}_0\), and by \((\mathcal{P}_i)_{1 \le i \le 4}\) the four infinite binary trees introduced in Point 2 of Lemma 3.3, see also Fig. 5. The root of \(\mathcal{P}_i\) is the triangle \(T_i\), for any \(1 \le i \le 4\), and the children of any \(T\in \mathcal{P}_i\) are those obtained by refining \(T\). For any ASC \(p\) and any \(1 \le i \le 4\) we denote

$$\begin{aligned} \mathcal{P}_i(p) := \{T \in \mathcal{P}_i; \, p(T) \text { does not hold}\}. \end{aligned}$$
(29)

The first point of Definition 3.4 implies that \(\mathcal{P}_i(p)\) is a (possibly empty) subtree of \(\mathcal{P}_i\): any \(T^{\prime } \in \mathcal{P}_i(T)\) is either the root \(T_i\), or the child of another \(T\in \mathcal{P}_i\). The second point of the same definition, combined with (27), implies that \(\mathcal{P}_i(p)\) is finite.

The finiteness of the trees \(\mathcal{P}_i(p)\), implies that the refinement procedure ends after a finite number of steps. As already observed right after Definition 3.2, the collection \(\mathcal{T}(p)\) of triangles obtained at the end of this procedure, which is also the set of outer leaves of the finite binary trees \((\mathcal{P}_i(p))_{1 \le i \le 4}\), is automatically a mesh satisfying Points (i) and (ii) of Definition 2.1.

As observed in Point 2 of Lemma 3.3, the collection of all elementary triangles is the disjoint union of the trees \((\mathcal{P}_i)_{1 \le i \le 4}\). Thus the subtrees \(\mathcal{P}_i(p)\) form a partition of the set \(\mathcal E (p)\). Recalling that the number of leaves of a binary tree is one plus the number of its inner nodes, we obtain

$$\begin{aligned} \#(\mathcal{T}(p)) = \sum _{1\le i \le 4} \left( 1+\#(\mathcal{P}_i(p))\right) = 4+ \#(\mathcal E (p)), \end{aligned}$$
(30)

which concludes the proof of the first point.

The implication \(p\Rightarrow p^{\prime }\) of two ASCs is equivalent to the reverse implication of the negations: \(\lnot p \Leftarrow \lnot p^{\prime }\), and thus to the inclusion \(\mathcal E (p) \supset \mathcal E (p^{\prime })\). If \(p\Rightarrow p^{\prime }\) we thus obtain \(\#(\mathcal E (p)) \ge \#(\mathcal E (p^{\prime }))\), and therefore \(\#(\mathcal{T}(p)) \ge \#(\mathcal{T}(p^{\prime }))\), which establishes Point 2.

For any two ASCs \(p,p^{\prime }\), we have \(\mathcal E (p\wedge p^{\prime }) = \mathcal E (p) \cup \mathcal E (p^{\prime })\). Hence \(\#(\mathcal E (p\wedge p^{\prime })) \le \#(\mathcal E (p))+\#(\mathcal E (p^{\prime }))\), and therefore \(\#(\mathcal{T}(p \wedge p^{\prime })) \le \#(\mathcal{T}(p)) + \#(\mathcal{T}(p^{\prime }))-4\), which concludes the proof of this proposition. \(\square \)

We establish in the following lemma a first non-trivial estimate of the mesh cardinality \(\#(\mathcal{T}(p))\), in terms of the constant \(s_p\) associated to the ASC \(p\).

Lemma 3.7

  • For any \(s \in [1, \infty [\) one has

    $$\begin{aligned} \sum _{\begin{array}{c} u \in {Z\!\!Z}^2\\ 0 < \Vert u\Vert \le s \end{array}} \frac{1}{\Vert u\Vert ^2} \le 8(1+ \ln s). \end{aligned}$$
    (31)
  • For each \(u \in {Z\!\!Z}^2\) denote

    $$\begin{aligned} \mathcal E ^+_u := \{v \in {Z\!\!Z}^2; \, \Vert u\Vert < \Vert v\Vert , \, 0 \le \langle u,v\rangle < s_p, \ \det (u,v) = 1\}, \end{aligned}$$

    and define \(\mathcal E ^-_u\) likewise, to the exception of the last constraint which is replaced with \(\det (u,v) = -1\). Then \(\#(\mathcal E ^\varepsilon _u) \le s_p/\Vert u\Vert ^2\), for \(\varepsilon \in \{+ , -\}\).

  • There exists a constant \(C\) such that for any ASC \(p\), with associated constant \(s_p \ge 1\), one has

    $$\begin{aligned} \#(\mathcal{T}(p)) \le C s_p (1+\ln s_p). \end{aligned}$$
    (32)

Proof

We first establish (31), and for that purpose we introduce the sup-norm \(\Vert \cdot \Vert _\infty \) on \(\mathbb{R }^2\) defined by \(\Vert (x,y)\Vert _\infty := \max \{|x|,|y|\}\). Clearly \(\Vert u\Vert _\infty \le \Vert u\Vert \) for all \(u\in \mathbb{R }^2\). For each \(k \in {Z\!\!Z}_+\) there exists precisely \((2k+1)^2\) elements \(u \in {Z\!\!Z}^2\) such that \(\Vert u\Vert _\infty \le k\). Hence for each integer \(k \ge 1\) there exists precisely \((2k+1)^2-(2k-1)^2 = 8 k\) elements \(u \in {Z\!\!Z}^2\) such that \(\Vert u\Vert _\infty = k\). Therefore

$$\begin{aligned} \sum _{\begin{array}{c} u \in {Z\!\!Z}^2\\ 0 < \Vert u\Vert \le s \end{array}} \frac{1}{\Vert u\Vert ^2} \le \sum _{\begin{array}{c} u \in {Z\!\!Z}^2\\ 0 < \Vert u\Vert _\infty \le s \end{array}} \frac{1}{\Vert u\Vert _\infty ^2} =\sum _{0<k\le s} \frac{8 k}{k^2} \le 8(1+ \ln s), \end{aligned}$$

which concludes the proof of 31.

We next turn to the proof of the second point, and for that purpose we consider a fixed \(u \in {Z\!\!Z}^2\) such that \(\mathcal E ^+_u\) is non-empty. Let \(v \in \mathcal E ^+_u\) be such that the scalar product \(\langle u,v\rangle \) is minimal. For any \(v^{\prime }\in E^+_u\) one has \(\det (u,v^{\prime }-v) = 1-1 = 0\), hence \(v^{\prime } = v+ \lambda u\) for some \(\lambda \in \mathbb{R }\). Since \(u,v,v^{\prime } \in {Z\!\!Z}^2\), and since \(u\) has coprime coordinates (recall that \(\det (u,v) = 1\)), the scalar \(\lambda \) must be an integer. We thus have

$$\begin{aligned} \langle u,v^{\prime }\rangle = \langle u,v\rangle + \lambda \Vert u\Vert ^2 < s_p. \end{aligned}$$

Since \(\langle u,v\rangle \le \langle u,v^{\prime }>\) we have \(\lambda \ge 0\). Since \(\langle u,v\rangle \ge \Vert u\Vert ^2\), using Point 1 of Lemma 3.3, we have \((1+\lambda ) \Vert u\Vert ^2 < s_p\). Hence \(0 \le \lambda < s_p/\Vert u\Vert ^2-1\), and therefore \(\#(\mathcal E ^+_u) \le s_p/\Vert u\Vert ^2\). Estimating \(\mathcal E ^-_u\) likewise, we conclude the proof of the second point.

Identifying an elementary triangle to its pair \((u,v)\) of non-zero vertices, ordered by increasing norm, we obtain

$$\begin{aligned} \mathcal E (p)\setminus \mathcal{T}_0 \subset \bigcup _{\begin{array}{c} u \in {Z\!\!Z}^2\\ \varepsilon \in \{-,+\} \end{array}} \mathcal E ^\varepsilon _u. \end{aligned}$$
(33)

Furthermore the set \(\mathcal E ^\varepsilon _u\) is empty for \(\Vert u\Vert >\sqrt{s_p}\), since using the second point of the proposition we find that its cardinal is strictly \(<\)1. Hence

$$\begin{aligned} \#(\mathcal E (p))&\le \#(\mathcal{T}_0) + \sum _{u \in {Z\!\!Z}^2} \left( \#(\mathcal E _u^+)+ \#(\mathcal E _u^-)\right) \\&\le 4+ \sum _{0<\Vert u\Vert \le \sqrt{s_p}} \frac{2 s_p}{\Vert u\Vert ^2} \le 4+16 s_p (1+\ln s_p). \end{aligned}$$

Recalling that \(\#(\mathcal{T}(p)) = 4+\#(\mathcal E (p))\), we conclude the proof of this proposition. \(\square \)

3.2 Mesh associated to an asymmetric norm

We reformulate and study in this subsection, in Proposition 3.9, the algorithmic construction of the \(F\)-acute mesh \(\mathcal{T}(F)\) given in the introduction for each asymmetric norm \(F\).

Our first lemma introduces a tool that will be frequently used in the rest of this paper: the approximation of an arbitrary asymmetric norm by smooth ones. For each \(\theta \in \mathbb{R }\) we denote

$$\begin{aligned} e_\theta := (\cos \theta ,\sin \theta ). \end{aligned}$$
(34)

Lemma 3.8

For any asymmetric norm \(F\) on \(\mathbb{R }^2\), there exists a sequence \((F_n)_{n \ge 1}\) of asymmetric norms such that

$$\begin{aligned} F_n \rightarrow F \text { locally uniformly on } \mathbb{R }^2, \text { as } n \rightarrow \infty , \end{aligned}$$

and for all \(n \ge 1\):

  • \(F_n \in C^\infty (\mathbb{R }^2\setminus \{0\})\).

  • \(\kappa (F_n) \le \kappa (F)\).

  • If \(F\) is symmetric, then so is \(F_n\).

Proof

We define the asymmetric norm \(F_n\) through polar coordinates and by convolution: for each \(r\ge 0\) and each \(\varphi \in \mathbb{R },\,\)

$$\begin{aligned} F_n(r e_\varphi ) := r \int \limits _\mathbb{R } F(e_\theta ) \mu _n(\varphi -\theta ) d \theta . \end{aligned}$$

We denoted by \(\mu _n\) the mollifier \(\mu _n(\theta ) := n \mu (n\theta )\), for all \(n \ge 1\), where \(\mu (\theta ) := e^{-\theta ^2}/\sqrt{\pi }\), for all \(\theta \in \mathbb{R }\).The four announced properties are immediate. \(\square \)

We presented in the introduction of this paper the construction of a mesh \(\mathcal{T}(F)\), associated to each asymmetric norm \(F\). This definition is tied to the mesh generation method by recursive refinement presented in the previous subsection, since we claim that

$$\begin{aligned} \mathcal{T}(F) = \mathcal{T}(p_F), \end{aligned}$$

where for an elementary triangle \(T\) of non-zero vertices \(u,v\), the predicate value \(p_F(T)\) stands for the test “\(u,v\) form an \(F\)-acute angle”, see the next proposition. Indeed, denote by \((T_k)_{k=0}^K\) the elementary triangles defined by the consecutive pairs \((u,v)\) of vectors subject to the test “If \(u,v\) form an \(F\)-acute angle”, in the construction of \(\mathcal{T}(F)\). These triangles, and their order of appearance, are shown on Fig. 6. The sequence \((T_k)_{k=0}^K\) constitutes an in-order transversal of the four binary trees in \(\mathcal E (p_F) \cup \mathcal{T}(p_F)\), see again Fig. 6 and the proof of Proposition 3.6.

Let us observe that Point (i) and (ii) of Definition 2.1, of \(F\)-acute meshes, hold by construction for any mesh of the form \(\mathcal{T}(p)\), where \(p\) is an ASC, as observed right above Lemma 3.3. On the other hand the predicate \(p_F\) is designed so as to enforce Point (iii) of this definition.

Proposition 3.9

Let \(F\) be an asymmetric norm on \(\mathbb{R }^2\).

  • Two vectors \(u,v\in \mathbb{R }^2\setminus \{0\}\) form an \(F\)-acute angle if \(\langle u,v\rangle \ge 0\) and

    (35)
  • The predicate \(p_F\) defined for any elementary triangle \(T\) by

    $$\begin{aligned} p_F(T) \text { holds if and only if the non-zero vertices of T form an F-acute angle},\nonumber \\ \end{aligned}$$
    (36)

    is an ASC, with associated constant \(s_{\!p_{\!F}} \le \sqrt{\kappa (F)^2-1}. \)

  • Any vertex \(u\) of \(\mathcal{T}(F)\) satisfies \(\Vert u\Vert \le 2 \kappa (F)\).

Proof

First Point. In order to establish (35), we restrict in a first time our attention to asymmetric norms \(F\) which are smooth: \(F\in C^1(\mathbb{R }^2 \setminus \{0\})\). In that case Proposition 4.6 (below, but proved independently) shows in (48) that for any \(\theta \in \mathbb{R }\). Since \(F\) is homogeneous, one has \(\nabla F(u) = \nabla F(\lambda u)\) for any \(\lambda >0\) and any \(u \in \mathbb{R }^2 \setminus \{0\}\), and therefore

Assuming (35) we thus obtain

and therefore \(\langle v,\nabla F(u)\rangle \ge 0\). Likewise \(\langle u,\nabla F(v)\rangle \ge 0\), hence using Point 1 of Lemma 2.2 we conclude that the vectors \(u,v\) form an \(F\)-acute angle.

Now let us consider an arbitrary, possibly non-smooth, asymmetric norm \(F\), two vectors \(u,v\) satisfying (35), and a sequence \((F_n)_{n \ge 0}\) of asymmetric norms as described in Lemma 3.8. It follows from the above argument that the vectors \(u,v\) form an \(F_n\)-acute angle for each \(n\ge 0\). Since Definition 2.1 of \(F\)-acuteness only involves non-strict inequalities, we obtain taking the limit that \(u,v\) form an \(F\)-acute angle.

Second Point. We need to check that \(p_F\) satisfies the heredity and finiteness properties which characterize ASCs, see Definition 3.4. Consider two vectors \(u,v\in \mathbb{R }^2\setminus \{0\}\) which form an \(F\)-acute angle. For each \(\delta \ge 0\) we obtain

$$\begin{aligned} F(u+v+\delta u)&= F((1+\delta )(u+v) - \delta v)\\&\ge (1+\delta ) F(u+v) - \delta F(v)\\&= F(u+v) + \delta ( F(u+v)-F(v))\\&\ge F(u+v), \end{aligned}$$

where we used the triangular inequality in the second line, and the fact that \(u\) and \(v\) form an \(F\)-acute angle in the last. For the same reason \(F(u+\delta (u+v)) = (1+\delta ) F(u+\delta v/(1+\delta )) \ge (1+\delta ) F(u) \ge F(u)\). Therefore \(u\) and \(u+v\) form an \(F\)-acute angle, and likewise \(v\) and \(u+v\) form an acute angle. As a result, if the predicate \(p_F\) holds for an elementary triangle, then it also holds for its children. This establishes the heredity property in Definition 3.4. For the finiteness property we consider an elementary triangle \(T\), of non-zero vertices \(u,v\), such that \(s(T) \ge \sqrt{\kappa (F)^2-1}\). It follows from (26) that , hence the first part of this proposition shows that \(u,v\) form an \(F\)-acute angle. Thus \(p_F(T)\) holds, which establishes the finiteness property of Definition 3.4, and concludes the proof of the second point.

Third Point. A triangle \(T \in \mathcal{T}(F)\) either belongs to \(\mathcal{T}_0\), or is the child of a triangle \(T^{\prime }\) in \(\mathcal E (p_F)\) which does not satisfy the predicate \(p_F\). In the first case there is nothing to prove, while in the second case the non-zero vertices \(u,v\) of \(T^{\prime }\) satisfy

$$\begin{aligned} \max \{\Vert u\Vert ^2, \Vert v\Vert ^2\} \le \Vert u\Vert ^2\Vert v\Vert ^2 = s(T)^2+1 \le s_{p_F}^2+1 \le \kappa (F)^2. \end{aligned}$$

We used the fact that \(\min \{\Vert u\Vert ,\Vert v\Vert \} \ge 1\), since these vectors have integer coordinates, and (26). Thus \(\Vert u\Vert \) and \(\Vert v\Vert \) are bounded by \(\kappa (F)\), and therefore \(\Vert u+v\Vert \le 2 \kappa (F)\). This concludes the proof since the non-zero vertices of the triangle \(T\) belong to \(\{u,u+v,v\}\). \(\square \)

At this point, we can establish the worst case analysis presented in Proposition 2.4, except for (16) which is proved later in Corollary 4.10.

Corollary 3.10

  • Let \(\kappa \ge 1\), let \(p_\kappa \) be the predicate “\(s(T) \ge \kappa \)”, and let \(\mathcal{T}_\kappa := \mathcal{T}(p_\kappa )\). Let also \(F\) be an asymmetric norm such that \(\kappa (F) \le \kappa \). Then \(\mathcal{T}_\kappa \) is \(F\)-acute and

    $$\begin{aligned} \#(\mathcal{T}(F)) \le \#(\mathcal{T}_\kappa ) \le C \kappa (1+\ln \kappa ). \end{aligned}$$
  • For each \(\tau \ge 1\), let \(F_\tau \) be the anisotropic euclidean norm defined by the positive definite matrix \( M_\tau := \left( \begin{array}{cc} 1 &{} \tau \\ \tau &{} 2\tau ^2 \end{array} \right) \). Then \(|\kappa (F_\tau ) - 2\tau | \le 1\) and \(\#(\mathcal{T}(F_\tau )) \ge 6+2 \lfloor \tau \rfloor \).

Proof

First Point. For any asymmetric norm \(F\) such that \(\kappa (F) \le \kappa \), we have \(s_{p_F} \le \sqrt{\kappa (F)^2-1} \le \sqrt{\kappa ^2-1} \le \kappa \). Hence \(p_\kappa \Rightarrow p_F\), which implies simultaneously that \(\#(\mathcal{T}(F)) \le \#(\mathcal{T}_\kappa )\) (using Point 2 of Proposition 3.6) and that \(\mathcal{T}_\kappa \) is \(F\)-acute (since \(p_F\) holds for all the elements of \(\mathcal{T}_\kappa \)). The upper bound on \(\#(\mathcal{T}_\kappa )\) was proved in Lemma 3.7.

Second point. The \(2 \times 2\) symmetric matrix \(M_\tau \) is positive definite since its trace and determinant are both positive. Denoting by \(0<\lambda ^2 \le \mu ^2\) the eigenvalues of \(M_\tau \), where \(\lambda \) and \(\mu \) are positive, one has

$$\begin{aligned} \kappa (F_\tau )=\frac{\mu }{\lambda }, \quad {{\mathrm{Tr}}}(M_\tau ) = \lambda ^2+\mu ^2 = 2\tau ^2+1, \quad \det (M_\tau ) = \lambda ^2\mu ^2 = 2 \tau ^2 -\tau ^2 = \tau ^2. \end{aligned}$$

Hence denoting \(\kappa := \kappa (F_\tau )\)

$$\begin{aligned} \frac{1}{\kappa }+ \kappa = \frac{\lambda }{\mu }+ \frac{\mu }{\lambda }= \frac{{{\mathrm{Tr}}}(M_\tau )}{\sqrt{\det M_\tau }} = \frac{2 \tau ^2+1}{\tau }= 2\tau + \frac{1}{\tau }. \end{aligned}$$

Therefore \(|\kappa -2 \tau | = |\tau ^{-1}-\kappa ^{-1}| \le 1\), since \(\kappa \ge 1\) and \(\tau \ge 1\).

We next observe that the elementary triangle of vertices \((1,0)\) and \((-r,1)\) is not \(F_\tau \)-acute for \(0 \le r < \tau \), since \(\langle (r,-1),M_\tau (1,0)\rangle = \langle (r,-1),(1, \tau )\rangle = r-\tau <0\). Considering these triangles and the symmetric ones with respect to the origin, we obtain \(2(1+\lfloor \tau \rfloor )\) non \(F_\tau \)-acute elementary triangles. Hence \(\#(\mathcal E (p_{F_\tau })) \ge 2 (1+\lfloor \tau \rfloor )\), and therefore \(\#(\mathcal{T}(F_\tau )) =4+\#(\mathcal E (p_{F_\tau })) \ge 6+2 \lfloor \tau \rfloor \) using (28), which concludes the proof. \(\square \)

In the next section, we estimate the cardinality of \(\mathcal{T}(F)\) for asymmetric norms \(F\) which are smooth on \(\mathbb{R }^2 \setminus \{0\}\). These results transfer to arbitrary asymmetric norms, using the approximation result Lemma 3.8 and the following lemma.

Lemma 3.11

Let \(F\) be an asymmetric norm, and let \((F_n)_{n \ge 0}\) be a sequence of asymmetric norms such that \(F_n \rightarrow F\) locally uniformly as \(n \rightarrow \infty \). Then

$$\begin{aligned} \#(\mathcal{T}(F))&\le \liminf _{n \rightarrow \infty } \#(\mathcal{T}(F_n)),\end{aligned}$$
(37)
$$\begin{aligned} \int \limits _0^{2\pi } \#(\mathcal{T}(F^{\theta }))\, d\theta&\le \liminf _{n \rightarrow \infty } \int \limits _0^{2\pi } \#(\mathcal{T}(F_n^{\theta })) \, d\theta . \end{aligned}$$
(38)

Proof

To avoid notational clutter, we denote \(\mathcal E (F) := \mathcal E (p_F)\), and \(\mathcal E (F_n) := \mathcal E (p_{F_n})\), see Definition 3.5. If an elementary triangle \(T\) belongs to \(\mathcal E (F)\), then it belongs to \(\mathcal E (F_n)\) for all \(n\) sufficiently large, since \(F\)-acuteness is a closed condition, see Definition 2.1. Hence

$$\begin{aligned} \mathcal E (F) \subset \bigcup _{N \ge 0} \bigcap _{n \ge N} \mathcal E (F_n). \end{aligned}$$

This immediately implies that \(\#(\mathcal E (F)) \le \liminf _{n \rightarrow \infty } \#(\mathcal E (F_n))\), by applying Fatou’s lemma to the characteristic functions of \(\mathcal E (F)\) and \(\mathcal E (F_n)\). Inequality (37) then follows from the identity \(\#(\mathcal{T}(F)) = 4+\#(\mathcal E (F))\), see (28).

The second estimate (38) immediately follows from the first one (37), by observing \(F_n^{\theta }\rightarrow F^{\theta }\) locally uniformly as \(n \rightarrow \infty \) for any \(\theta \in [0,2 \pi ]\), and applying Fatou’s lemma on this interval. \(\square \)

4 Average complexity

This section is devoted to the estimate of the cardinality \(\#(\mathcal{T}(F))\) of the stencils used in the FM-ASR, and of the average value of \(\#(\mathcal{T}(F^{\theta }))\), as \(\theta \in [0,2\pi ]\). Estimates are obtained for increasingly general types of (asymmetric) norms \(F\): anisotropic euclidean norms in the first subsection, symmetric norms in the second, and finally asymmetric norms in the third. Each subsection builds on the estimate of the former one, hence they are not independent.

4.1 Anisotropic euclidean norms

An anisotropic euclidean norm \(F\), is a norm given by a symmetric positive definite matrix \(M\): for all \(u \in \mathbb{R }^2,\,F(u) := \sqrt{u^\mathrm T M u}\). Our first lemma shows that the triangles refined during the construction of \(\mathcal{T}(F)\) are aligned with the eigenspace associated to the small eigenvalue of \(M\), see also Fig. 7.

Lemma 4.1

  • Let \(F\) be an anisotropic euclidean norm, given by a matrix \(M\in S_2^+\). If the non-zero vertices of an elementary triangle \(T\) do not form an \(F\)-acute angle, then \(T\) contains an eigenvector for the smallest eigenvalue of \(M\) in its interior.

  • For any anisotropic euclidean norm \(F\) one has \(\#(\mathcal{T}(F)) \le 6+2 \kappa (F)\).

Proof

First Point. Let \(0<\lambda \le \mu \) the eigenvalues of \(M\), and let \(e\) a normalized eigenvector of \(M\) associated to the eigenvalue \(\lambda \). Let also \(u,v\) be the non-zero vertices of \(T\). Then

$$\begin{aligned} \langle u, M v\rangle \!=\! \lambda \langle u,e\rangle \langle v,e\rangle \!+\! \mu \det (u,e) \det (v,e) \!=\! \lambda \langle u,v\rangle \!+\! (\mu -\lambda ) \det (u,e) \det (v,e), \end{aligned}$$

where we used the identity \(\langle u,v\rangle = \langle u,e\rangle \langle v,e\rangle + \det (u,e) \det (v,e)\). Since \(u,v\) do not form an \(F\)-acute angle, we have \(\langle u,M v\rangle <0\) using Point 2 of Lemma 2.2. On the other hand \(\langle u,v\rangle \ge 0\). It follows that \(\det (u,e) \det (v,e) < 0\), and therefore \(\det (u,e)\) and \(\det (v,e)\) are non-zero and have opposite signs. Hence by continuity (or linearity) there exists \(t\in (0,1)\) such that \(\det (t u+(1-t) v, e)=0\), which concludes the proof of this point.

We next turn to the proof of second point, and for that purpose we adopt the notations of Proposition 3.6 and consider the four trees \((\mathcal{P}_i(p_F))_{1 \le i \le 4}\). It follows from the first point of this lemma that two of these trees are empty, and that the other two have a single branch, see also Fig. 7. The number of elements of these single branched trees is bounded by \(1+s_{P_F} = 1+\sqrt{\kappa (F)^2-1} \le 1+\kappa (F)\), using (27) and the second point of Proposition 3.9. We finally obtain using (30) that \( \#(\mathcal{T}(F)) \le 4+2 \times 0 + 2\left( 1+\kappa (F)\right) = 6+2\kappa (F) \) which concludes the proof. \(\square \)

Definition 4.2

(The following definitions are restricted to this section) We consider a fixed constant \(\kappa \ge 1\), and denote by \(F\) the norm defined by the diagonal matrix \(D\) of entries \((\kappa ^{-1}, \kappa )\), in such way that \(F(x,y) = \sqrt{\kappa ^{-1}x^2+\kappa y^2}\).

  • For each \(\theta \in [0,2\pi ]\) the norm \(F^\theta \) is of anisotropic euclidean type, defined by the matrix \(M_\theta = R_\theta D R_\theta ^\mathrm T \), and satisfies \(\kappa (F^\theta ) = \kappa (F) = \kappa \).

  • We denote by \(\mathcal E _\theta ,\,\theta \in [0,2\pi ]\), the collection of elementary triangles which non-zero vertices do not form an \(F^\theta \)-acute angle. In other words \(\mathcal E _\theta := \mathcal E (p_{F^\theta })\).

  • For each elementary triangle \(T\), we define \(I_T := \{\theta \in [0,2\pi ]; \, T \in \mathcal E _\theta \}\).

It follows from (28), that for any \(\theta \in [0, 2 \pi ]\) one has

$$\begin{aligned} \#(\mathcal{T}(F^{\theta })) = 4 + \#(\mathcal E _\theta ). \end{aligned}$$
(39)

Furthermore, we have by construction

$$\begin{aligned} \int \limits _0^{2 \pi } \#(\mathcal E _\theta ) \, d\theta = \sum _T |I_T|, \end{aligned}$$
(40)

where \(T\) ranges over all elementary triangles, and \(|I_T|\) denotes the Lebesgue measure of \(I_T\).

Proposition 4.3

For any fixed \(u\in {Z\!\!Z}^2 \setminus \{0\}\), let \(A_u\) the collection of all elementary triangles \(T\), containing \(u\) as a vertex, and such that the other non-zero vertex \(v\) satisfies \(\Vert u\Vert \le \Vert v\Vert \). Then

$$\begin{aligned} \sum _{T\in A_u} |I_T| \le \frac{C(1+\ln \kappa )}{\Vert u\Vert ^2}, \end{aligned}$$
(41)

and furthermore this sum equals \(0\) if \(\Vert u\Vert \ge \sqrt{\kappa }\).

Proof

Let \(T\) be an elementary triangle such that \(I_T\ne \emptyset \), and let \(u,v\) be the non-zero vertices of \(T\), with \(\Vert u\Vert \le \Vert v\Vert \). Since \(\kappa (F^{\theta }) = \kappa \) for any \(\theta \in \mathbb{R }\), we obtain using (35) and (25)

(42)

and therefore \(\Vert u\Vert < \sqrt{\kappa }\). It follows as announced that (41) is zero if \(\Vert u\Vert \ge \sqrt{\kappa }\).

It follows from Lemma 4.1 that \(t u+(1-t) v\) is proportional to \(e_\theta \), for some \(t \in \, ]0,1[\). Hence

(43)

where we used the concavity estimate \(\sin (\pi x/2) \ge x\) for \(x \in [0, 1]\).

We denote by \(v_\varepsilon \), for \(\varepsilon \in \{-1,1\}\), the element of \({Z\!\!Z}^2\) for which the scalar product \(\langle u, v_\varepsilon \rangle \) is non-negative and minimal, under the constraint that \(\det (u,v_\varepsilon ) \!=\! \varepsilon \) and \(\Vert v_\varepsilon \Vert \!\ge \! \Vert u\Vert \).

If \(\det (u,v) = \varepsilon \), then \(v-v_\varepsilon = \lambda u\) for some \(\lambda \in \mathbb{R }\). Observing that \(u,v,v_\varepsilon \) have integer coordinates, and that \(u\) has coprime coordinates, since \(|\det (u,v)|=1\), we obtain that \(\lambda \) is an integer. The scalar \(\lambda \) is non-negative since \(\langle u,v_\varepsilon \rangle \le \langle u,v\rangle = \langle u,v_\varepsilon \rangle + \lambda \Vert u\Vert ^2\). Last we observe using (42) that \(\kappa > \Vert u\Vert \Vert v\Vert \ge \langle u,v\rangle = \langle u,v_\varepsilon + \lambda u \rangle \ge \lambda \Vert u\Vert ^2\), hence \(\lambda \le \kappa / \Vert u\Vert ^2 \le \kappa \).

We have \(\Vert v_\varepsilon \Vert \ge \Vert u\Vert \) by construction, and \(\Vert v_\varepsilon + \lambda u\Vert \ge \lambda \Vert u\Vert \) for any \(\lambda \ge 1\), since \(\langle u,v_\varepsilon \rangle \ge 0\). Therefore, recalling (43),

$$\begin{aligned} \sum _{T \in A_u} |I_T| \le \sum _{\varepsilon \in \{1,-1\}} \sum _{0 \le \lambda \le \kappa } \frac{\pi }{\Vert u\Vert \Vert v_\varepsilon + \lambda u\Vert } \le \sum _{0 \le k \!\le \! \kappa } \frac{2 \pi }{\Vert u\Vert ^2 \max \{\lambda ,1\}} \!\le \! \frac{2 \pi (2+\ln \kappa )}{\Vert u\Vert ^2}, \end{aligned}$$

which concludes the proof of this proposition. \(\square \)

The following corollary implies the main result of this paper, Theorem 2.5, in the special case of anisotropic euclidean norms.

Corollary 4.4

There exists a constant \(C\) such that for any anisotropic euclidean norm \(G\) one has

$$\begin{aligned} \int \limits _0^{2 \pi } \#(\mathcal{T}(G^{\theta })) \, d\theta \le C(1+\ln \kappa (G))^2. \end{aligned}$$

Proof

It is sufficient to prove this result for the specific norm \(F\) introduced in Definition 4.2, since any anisotropic euclidean norm has this form, up to a rotation and a multiplication by a positive scalar.

The sum (40) of the interval lengths \(|I_T|\) associated to all elementary triangles \(T\), can be bounded as follows:

$$\begin{aligned} \sum _T |I_T| \le \sum _{u\in {Z\!\!Z}^2} \sum _{T\in A_u} |I_T| \le C(1+\ln \kappa ) \sum _{\begin{array}{c} u\in {Z\!\!Z}^2\setminus \{0\}\\ \Vert u\Vert \le \sqrt{\kappa } \end{array}} \frac{1}{\Vert u\Vert ^2} \le 8C (1+\ln \kappa )^2, \end{aligned}$$

where we used (41) for the second inequality, and (31) for the last one. Combining this estimate with (39), we conclude the proof:

$$\begin{aligned} \int \limits _0^{2 \pi } \#(\mathcal{T}(F^{\theta })) \, d \theta = 4+\int \limits _0^{2 \pi } \#(\mathcal E _\theta ) \, d\theta = 4+\sum _T |I_T| \le 4+8C(1+\ln \kappa )^2. \end{aligned}$$

\(\square \)

4.2 Symmetric norms

In this section and the following one, we denote by \(\mathfrak{F }\) the collection of asymmetric norms which are continuously differentiable outside of the origin. To each \(F \in \mathfrak{F }\) we attach a \(2\pi \)-periodic map \(\varphi _F : \mathbb{R } \rightarrow \, ]-\pi /2,\pi /2[\), introduced in the following definition, which encodes the direction of its gradient. See Fig. 8 (left) for an illustration and (center) for two examples.

Fig. 8
figure 8

Illustration of Definition 4.5 (left), \(\varphi _F(\theta )<0\) in this example. Graph of \(\varphi _F(\theta )\) (center) for an anisotropic euclidean norm given by a diagonal matrix (plain ), and the asymmetric norm \(\sqrt{x^2+y^2}-0.9x\) (dashed). Notations of Proposition 4.6

Definition 4.5

For any \(F\in \mathfrak{F }\) and any \(\theta \in \mathbb{R }\), let \( \varphi _F(\theta ) := \)

Since the asymmetric norm \(F\) is \(1\)-homogeneous, we have \(\langle e_\theta , \nabla F(e_\theta )\rangle = F(e_\theta )>0\) for all \(\theta \in \mathbb{R }\), hence

$$\begin{aligned} \varphi _F(\theta ) \in \ ]\!-\pi /2, \pi /2[. \end{aligned}$$
(44)

The composition of \(F\) with a rotation, corresponds to the composition of \(\varphi _F\) with a translation:

$$\begin{aligned} \varphi _{F^\theta } = \varphi _F(\cdot -\theta ). \end{aligned}$$
(45)

Note that \(\varphi _F\) is \(\pi \)-periodic if \(F\) is symmetric, and odd if \(F(x,y) = F(x,-y)\) for all \(x,y \in \mathbb{R }\). In the special case of the euclidean norm, \(F_0(u) := \Vert u\Vert \), we have \(\nabla F_0(u) = u/\Vert u\Vert \), hence \(\varphi _{F_0} = 0\) identically on \(\mathbb{R }\).

The next proposition establishes the two most noticeable properties of \(\varphi _F\) aside from its periodicity: its integrals are bounded (46) in terms of the anisotropy ratio \(\kappa (F)\), and it obeys a semi-Lipschitz regularity property (47).

Proposition 4.6

For any \(F \in \mathfrak{F }\) and any \(\theta \in \mathbb{R }\), one has \( \frac{d}{d\theta } \ln F(e_\theta ) = \tan \varphi _F(\theta ). \) As a result for any \(h>0\)

$$\begin{aligned} \left| \int \limits _\theta ^{\theta +h} \tan \varphi _F\right| \le \ln \kappa (F). \end{aligned}$$
(46)

Furthermore \(\varphi _F\) is right-Lipschitz, and \(|\varphi _F|\) is bounded strictly away from \(\pi /2\):

$$\begin{aligned} \varphi _F(\theta +h)&\ge \varphi _F(\theta ) - h,\end{aligned}$$
(47)
$$\begin{aligned} \cos \varphi _F(\theta )&\ge 1/\kappa (F). \end{aligned}$$
(48)

Proof

Let \(r\in C^1(\mathbb{R },\mathbb{R }_+^*)\) be defined by \(r(\theta ) := 1/F(e_\theta )\), for all \(\theta \in \mathbb{R }\). This quantity is illustrated on Fig. 8 (right), as well as the vectors \(e_\theta ^\perp \) and \(\nabla F(e_\theta )^\perp \), where \(u^\perp \) denotes the rotation by \(\pi /2\) of a vector \(u\in \mathbb{R }^2\). One easily obtains the Taylor development

$$\begin{aligned} r(\theta +h) = r(\theta ) + h r(\theta ) \tan (-\varphi _F(\theta ))+ o(h), \end{aligned}$$

for any fixed \(\theta \in \mathbb{R }\), and for small \(h\). In other words r\(^{\prime }(\theta ) = - r(\theta ) \tan \varphi _F(\theta )\), and equivalently \(\frac{d}{d\theta } \ln F(e_\theta ) = \tan \varphi _F(\theta )\). The left hand side of (46) therefore equals \(|\ln F(e_\theta ) - \ln F(e_{\theta +h})|\), which as announced is bounded by \(\ln \kappa (F)\), by definition of the anisotropy ratio 1.

Let \(\psi (\theta ) := \theta +\varphi _F(\theta )\), for all \(\theta \in \mathbb{R }\). By construction, \(\nabla F(e_\theta )\) is positively proportional to \(e_{\psi (\theta )}\) for all \(\theta \in \mathbb{R }\).

The vectors \(e_{\psi (\theta )}\) and \(e_{\psi (\theta )}^\perp \) are respectively the unit normal and the unit tangent to the set \(B_F := \{z\in \mathbb{R }^2; \, F(z) \le 1\}\), in the direction \(e_\theta \). Since \(B_F\) is convex, the derivative of the tangent vector \(\frac{d}{d\theta } e_\psi (\theta )^\perp = -\psi ^{\prime }(\theta )e_{\psi (\theta )}\) is negatively proportional to the normal \(e_{\psi (\theta )}\). This shows that \(\psi ^{\prime }(\theta ) \ge 0\), for all \(\theta \in \mathbb{R }\), hence that \(\psi \) is non-decreasing. Recalling that \(\varphi _F(\theta ) = \psi (\theta ) - \theta \), we conclude that \(\varphi _F\) is the difference of a non-decreasing function and a \(1\)-Lipschitz function, which establishes 47.

For the last inequality, we fix \(\theta \) and first assume that \(\varphi := \varphi _F(\theta ) \ge 0\). We obtain using 46

$$\begin{aligned} \ln \kappa (F) \ge \int \limits _\theta ^{\theta +\varphi } \tan \varphi _F \ge \int \limits _0^\varphi \tan (\varphi -u) du = -\ln (\cos \varphi ), \end{aligned}$$

hence \(\cos (\varphi ) \ge 1/\kappa (F)\), as announced. If \(\varphi \le 0\), a similar argument involving the integral on \([\theta + \varphi , \theta ]\) yields the same estimate, which concludes the proof of this proposition. \(\square \)

We rephrase in the next lemma a geometrical property, on the gradients of a family of asymmetric norms, into inequalities between the attached functions.

Lemma 4.7

Let \(F,F_1, \ldots , F_r \in \mathfrak{F }\), and let \(u\in \mathbb{R }^2\). The following are equivalent:

  • There exists \(\alpha _1, \ldots , \alpha _r\in \mathbb{R }_+\) such that

    $$\begin{aligned} \nabla F(u) = \sum _{1 \le i \le r} \alpha _i \nabla F_i(u). \end{aligned}$$
    (49)
  • Let \(\theta \in \mathbb{R }\) be such that \(u\) and \(e_\theta \) are positively collinear. Then

    $$\begin{aligned} \min \{ \varphi _{F_1}(\theta ), \ldots , \varphi _{F_r}(\theta )\} \le \varphi _F(\theta ) \le \max \{ \varphi _{F_1}(\theta ), \ldots , \varphi _{F_r}(\theta )\} \end{aligned}$$
    (50)

Proof

Since \(F\) is \(1\)-homogeneous, we have \(\nabla F(u) = \nabla F(u/\Vert u\Vert ) = \nabla F(e_\theta )\) (likewise \(\nabla F_i(u) = \nabla F_i(e_\theta )\)). Let \(v := \lambda \nabla F(u)\) (resp. \(v_i := \lambda _i \nabla F_i(u)\)), where the positive scalar \(\lambda \) (resp. \(\lambda _i\)) is chosen so that \(\langle u,v\rangle = 1\) (resp. \(\langle u,v_i\rangle = 1\)). We introduce the angles \(\varphi := \varphi _F(\theta )\) (resp. \(\varphi _i:=\varphi _{F_i}(\theta )\)), which belong to \(]-\pi /2,\pi /2[\), see (44), and we observe that \(\tan \varphi = \det (u,v)/\langle u,v\rangle =\det (u,v)\) (resp. \(\tan \varphi _i = \det (u,v_i)\)).

Proof that (49) \(\Rightarrow \) (50). Assuming (49), and denoting \(\beta _i := (\lambda /\lambda _i) \alpha _i \ge 0\), we have \(v = \sum _{i=1}^r \beta _i v_i\) and therefore

$$\begin{aligned} 1 = \langle u,v\rangle&= \sum _{1 \le i \le r} \beta _i \langle u,v_i\rangle = \sum _{1 \le i \le r} \beta _i,\\ \tan \varphi = \det (u,v)&= \sum _{1 \le i \le r} \beta _i \det (u,v_i) = \sum _{1 \le i \le r} \beta _i \tan \varphi _i. \end{aligned}$$

This shows that \(\tan \varphi \) is a weighted average of the reals \((\tan \varphi _i)_{i=1}^r\), which implies (50) since the function \(\tan \) is increasing on \(]\!-\pi /2, \pi /2[\).

Proof that (50) \(\Rightarrow \) (49). Conversely, if (50) holds, we may assume without loss of generality that \(\varphi _1 \le \varphi \le \varphi _2\). We thus have \(\tan \varphi _1 \le \tan \varphi \le \tan \varphi _2\), hence there exists barycentric coefficients \(\beta _1,\beta _2\in \mathbb{R }_+,\,\beta _1+\beta _2=1\), such that \(\tan \varphi = \beta _1\tan \varphi _1+\beta _2\tan \varphi _2\). Setting \(\beta _3=\ldots =\beta _r=0\), we thus have \(\tan \varphi = \sum _{i=1}^r \beta _i \tan \varphi _i\). Defining \(V = \sum _{i=1}^r \beta _i v_i\), we obtain proceeding as above \(\langle u,v\rangle =1=\langle u,V\rangle \) and \(\det (u,v) = \tan \varphi = \det (u,V)\), hence \(v=V\). Denoting \(\alpha _i := (\lambda _i/\lambda ) \beta _i\) we obtain \(\nabla F(u) = \sum _{i=1}^r \alpha _i \nabla F_u(u)\), which establishes (49) and concludes the proof. \(\square \)

We emphasize the next proposition, which is a central component of our strategy. Consider a “complex” asymmetric norm \(F\), and “simpler” norms \((F_i)_{i=1}^r\), say of anisotropic euclidean type. Assume that \(\varphi _F\) is bounded in the sense of (51) by the \(\varphi _{F_i}\). The following result shows that \(\#(\mathcal{T}(F))\) can be estimated in terms of the \(\#(\mathcal{T}(F_i))\), for which efficient bounds were developped in the previous subsection.

Proposition 4.8

Let \(F,F_1, \ldots , F_r \in \mathfrak{F }\) be such that everywhere on \(\mathbb{R }\)

$$\begin{aligned} \min \{ \varphi _{F_1}, \ldots , \varphi _{F_r}\} \le \varphi _F \le \max \{ \varphi _{F_1}, \ldots , \varphi _{F_r}\}. \end{aligned}$$
(51)

Then

$$\begin{aligned} \#(\mathcal{T}(F))&\le \sum _{1 \le i \le r} \#(\mathcal{T}(F_i)), \ \text { and } \ \int \limits _0^{2 \pi } \#(\mathcal{T}(F^{\theta }))\, d\theta \nonumber \\&\le \sum _{1 \le i \le r} \int \limits _0^{2\pi } \#(\mathcal{T}(F_i^{\theta }))\, d\theta . \end{aligned}$$
(52)

Proof

We begin with the proof of an intermediate result: if (51) holds, then we have the implication of ASCs

$$\begin{aligned} p_{F_1} \wedge \cdots \wedge p_{F_r} \Rightarrow p_F. \end{aligned}$$
(53)

Indeed let \(T\) be an elementary triangle, of non-zero vertices \(u,v\). Let \(\theta _u, \theta _v \in \mathbb{R }\) be such that \(e_{\theta _u}, e_{\theta _v}\) are respectively positively proportional to \(u,v\). Assume that \((p_{F_1} \wedge \cdots \wedge p_{F_r})(T)\) holds, which means that \(u,v\) form an \(F_i\)-acute angle for all \(1 \le i \le r\). Using Lemma (2.2) we obtain that \(\langle u,\nabla F_i(v)\rangle \ge 0\) and \(\langle v,\nabla F_i(u)\rangle \ge 0\), for all \(1 \le i \le r\). Using 51 and Lemma 4.7 we find that \(\nabla F(u)\) is a linear sum with non-negative coefficients of the vectors \(\nabla F_i(u),\,1 \le i \le r\), hence \(\langle v,\nabla F(u)\rangle \ge 0\). Likewise \(\langle u,\nabla F(v)\rangle \ge 0\). Using again Lemma 2.2 we obtain that \(u,v\) form an \(F\)-acute angle, hence \(p_F(T)\) holds. This concludes the proof of (53).

The left part of (52) immediately follows from (53) and Point 3 of Proposition 3.6. Due to the translation invariance (45), inequality (51) is equivalent to \(\min \{ \varphi _{F_1^{\theta }}, \ldots , \varphi _{F_r^{\theta }}\} \le \varphi _{F^\theta } \le \max \{ \varphi _{F_1^\theta }, \ldots , \varphi _{F_r^\theta }\}\) for any \(\theta \in \mathbb{R }\), and thus implies \(\#(\mathcal{T}(F^\theta )) \le \sum _{1 \le i \le r} \#(\mathcal{T}(F_i^\theta ))\). Integrating over \([0,2\pi ]\) we obtain the right part of (52), which concludes the proof. \(\square \)

The next technical lemma describes the periodic function attached to an anisotropic euclidean norm. This is a prerequisite if one wants to construct a well chosen family \((F_i)_{i=1}^r\) of such norms which satisfies (51), given an asymmetric norm \(F\) of interest.

Lemma 4.9

  • The anisotropic euclidean norm \(F\) defined by the diagonal matrix of entries \((\kappa ^{-1}, \kappa )\), where \(\kappa \ge 1\), satisfies \(\kappa (F) = \kappa \). The function \(\varphi _F\) attains its maximum at \(\theta _\kappa := \arctan (\kappa ^{-1})\), which is

    $$\begin{aligned} \varphi _F(\theta _\kappa ) = \arctan \left[ \left( \kappa - \kappa ^{-1}\right) /2 \right] . \end{aligned}$$
  • There exists a finite number anisotropic euclidean norms \(F_1, \ldots , F_r\), such that on \(\mathbb{R }\)

    $$\begin{aligned} \min \{ \varphi _{F_1},\ldots ,\varphi _{F_r}\} \le -\pi /4 \ \text { and } \ \pi /4 \le \max \{ \varphi _{F_1}, \ldots , \varphi _{F_r}\}. \end{aligned}$$

Proof

First point. Let \(D\) be the diagonal matrix of entries \((1/\kappa , \kappa )\). We have \(F(u)^2 = \langle u, D u\rangle \) for any \(u \in \mathbb{R }^2\), hence \(F(u) \nabla F(u) = Du\) for any \(u\ne 0\), by differentiation. It follows that \(F(e_\theta ) \nabla F(e_\theta ) = \left( \kappa ^{-1} \cos \theta , \kappa \sin \theta \right) \), for each \(\theta \in \mathbb{R }\), and therefore

$$\begin{aligned} \tan \varphi _F(\theta ) = \frac{\det (e_\theta ,\nabla F(e_\theta ))}{\langle e_\theta , \nabla F(e_\theta )\rangle } = \frac{ (\kappa - 1/\kappa ) \cos \theta \sin \theta }{\kappa ^{-1}\cos ^2 \theta + \kappa \sin ^2 \theta } = \frac{ \kappa -1/\kappa }{(\kappa \tan \theta )^{-1} + \kappa \tan \theta }, \end{aligned}$$

where the right hand side equals \(0\) by convention if \(\theta \) is a multiple of \(\pi /2\). The maximum value of this right hand side is attained when its denominator is positive and minimal, that is when \(\kappa \tan \theta = 1\). Thus the maximum value of \(\tan \varphi _F\) is \((\kappa -1/\kappa )/2\), attained at \(\theta _\kappa \), as announced.

Second point. Let \(\kappa \) be sufficiently large (\(\kappa =13\) is fine) in such way that

$$\begin{aligned} \arctan \left[ \left( \kappa - \kappa ^{-1}\right) /2 \right] \ge \pi /4+ \pi /5. \end{aligned}$$

Let \(F\) be the norm associated to the diagonal matrix of entries \((1/\kappa ,\kappa )\). Since \(F\) is symmetric, the function \(\varphi _F\) is \(\pi \)-periodic. Since \(F\) is defined by a diagonal matrix we have \(F(x,y) = F(x,-y)\) for all \(x,y\in \mathbb{R }\), and therefore \(F\) is odd. Furthermore for all \(\theta \in [\theta _\kappa , \theta _\kappa +\pi /5]\) we have \(\varphi _F(\theta ) \ge \varphi _F(\theta _\kappa ) - \pi /5 \ge \pi /4\), using (47). Finally for all \(n \in {Z\!\!Z}\)

$$\begin{aligned}&\varphi _F \ge \pi /4 \text { on } [n \pi + \theta _\kappa , \, n \pi + \theta _\kappa +\pi /5], \ \text { and } \ \\&\quad \varphi _F \le -\pi /4 \text { on } [n \pi - \theta _\kappa -\pi /5,\, n \pi - \theta _\kappa ]. \end{aligned}$$

We choose \(r:=5\), and introduce the anisotropic euclidean norms \(F_k := F^{k\pi /5}\), for \(1 \le k \le 5\). Using the translation invariance (45) we see that the sets on which \(\varphi _{F_i} \ge \pi /4\) (resp. \(\varphi _{F_i} \le -\pi /4\)), \(1 \le i \le r\), contain intervals which cover the whole line \(\mathbb{R }\). This concludes the proof. \(\square \)

For any asymmetric norm \(F\) and any \(A \in {{\mathrm{GL}}}_2\), we denote by \(F \circ A\) the asymmetric norm defined by

$$\begin{aligned} F\circ A(u) := F(Au). \end{aligned}$$

Clearly \(F \circ A\) is symmetric (resp. is an element of \(\mathcal{F}\), resp. is of anisotropic euclidean type) if and only is that is the case for \(F\). We denote \(\kappa (A) := \Vert A\Vert \Vert A^{-1}\Vert \), and point out that \(\Vert Au\Vert /\Vert Av\Vert \le \kappa (A)\) for any \(u,v\in \mathbb{R }^2\) such that \(\Vert u\Vert =\Vert v\Vert =1\). It easily follows that

$$\begin{aligned} \max \left\{ \frac{\kappa (F)}{\kappa (A)}, \frac{\kappa (A)}{\kappa (F)}\right\} \le \kappa (F\circ A) \le \kappa (F) \kappa (A). \end{aligned}$$
(54)

Choosing \(A=R_\theta ^\mathrm T \), for some \(\theta \in \mathbb{R }\), we recover in particular that \(\kappa (F^{\theta }) = \kappa (F)\), for all \(\theta \in \mathbb{R }\).

We establish in the next corollary the average case and the worst case estimates for \(\#(\mathcal{T}(F))\), where \(F\) is an arbitrary symmetric norm, which were announced in Theorem 2.5 and Proposition 2.4 respectively.

Corollary 4.10

  • For each symmetric norm \(G\) there exists \(A \in {{\mathrm{GL}}}_2\) such that \(F := G \circ A\) satisfies \(\kappa (F) \le \sqrt{2}\). If \(G \in \mathfrak{F }\), we therefore have on \(\mathbb{R }\)

    $$\begin{aligned} -\pi /4 \le \varphi _F \le \pi /4. \end{aligned}$$
    (55)
  • There exists a constant \(C\) such that for any symmetric norm \(G\) one has

    $$\begin{aligned} \#(\mathcal{T}(G)) \le C \kappa (G), \ \text { and } \ \int \limits _0^{2\pi } \#(\mathcal{T}(G^{\theta })) \, d\theta \le C (1+\ln \kappa (G))^2. \end{aligned}$$
    (56)

Proof

First point. A classical theorem by John states that for any \(d\)-dimensional convex set \(B\) which is symmetric with respect to the origin, there exists an ellipsoid \(E\) centered at the origin and such that \(E \subset B \subset E \sqrt{d}\). Applying this result to \(B := \{u\in \mathbb{R }^2; \, G(u) \le 1\}\), we obtain an ellipsoid \(E\) that can be written under the form \(E := \{A u ;\, \Vert u\Vert \le 1\}\), for some \(A \in {{\mathrm{GL}}}_2\). It easily follows by homogeneity that, for all \(u \in \mathbb{R }^2\)

$$\begin{aligned} \Vert u\Vert /\sqrt{2} \le G(A u) = F(u) \le \Vert u\Vert . \end{aligned}$$

Hence \(\kappa (F) \le \sqrt{2}\) as announced. If \(G \in \mathfrak{F }\), then \(\varphi _F\) is well defined and we have \(\cos (\varphi _{F}(\theta )) \le 1/\kappa (F) \le 1/\sqrt{2}\), for all \(\theta \in \mathbb{R }\), using Proposition 4.6. Finally \(|\varphi _F(\theta )| \le \arccos (1/\sqrt{2}) = \pi /4\).

Second point, keeping the same notations. In view of Lemmas 3.8 and 3.11, we can assume that \(G\in \mathfrak{F }\). Let \(F_1, \ldots , F_r\) be as in the second point of Lemma 4.9, and let \(G_i := F_i \circ A^{-1}\), for \(1 \le i \le r\).We have by construction, identically on \(\mathbb{R }\)

$$\begin{aligned} \min \{ \varphi _{F_1}, \ldots , \varphi _{F_r}\} \le -\pi /4 \le \varphi _F \le \pi /4 \le \max \{ \varphi _{F_1}, \ldots , \varphi _{F_r}\}. \end{aligned}$$

Hence for each \(u\in \mathbb{R }^2\setminus \{0\}\) there exists, using Lemma 4.7, non-negative coefficients \(\alpha _1, \ldots , \alpha _r\) such that:

$$\begin{aligned} A^\mathrm T \nabla G (A u) = \nabla F(u) = \sum _{1 \le i \le r} \alpha _i \nabla F_i(u) = A^\mathrm T \left( \sum _{1 \le i \le r} \alpha _i G_i(Au)\right) . \end{aligned}$$
(57)

It follows that \(\nabla G(v)\) is a linear combination with non-negative coefficients of the \(\nabla G_i(v),\,1 \le i \le r\), for any \(v \in \mathbb{R }^2 \setminus \{0\}\) (choose \(u=A^{-1} v\) in (57)). Using again Lemma 4.7 we conclude that \(\min \{\varphi _{G_1}, \ldots , \varphi _{G_r}\} \le \varphi _G \le \max \{\varphi _{G_1},\ldots , \varphi _{G_r}\}\) on \(\mathbb{R }\).

Hence

$$\begin{aligned} \#(\mathcal{T}(G))&\le \sum _{1 \le i \le r} \#(\mathcal{T}(G_i)) \le C \sum _{1 \le i \le r} \kappa (G_i),\end{aligned}$$
(58)
$$\begin{aligned} \int \limits _0^{2\pi } \#(\mathcal{T}(G^{\theta })) \, d\theta&\le \sum _{1 \le i \le r} \int \limits _0^{2\pi } \#(\mathcal{T}(G^{\theta }_i)) \le C \sum _{1 \le i \le r} (1+\ln \kappa (G_i))^2, \end{aligned}$$
(59)

where we used Proposition 4.8 for the first inequality, of both lines, and for the second inequality Lemma 4.1 in the first line, and Corollary 4.4 in the second line.

On the other hand we obtain using (54), with \(\kappa (A):= \Vert A\Vert \Vert A^{-1}\Vert ,\,\)

$$\begin{aligned} \kappa (G_i) = \kappa (F_i \circ A) \le \kappa (F_i) \kappa (A) \ \text { and } \ \kappa (G) \ge \frac{\kappa (A)}{\kappa (G\circ A)} = \frac{\kappa (A)}{\kappa (F)} \ge \frac{\kappa (A)}{\sqrt{2}}, \end{aligned}$$

thus \(\kappa (G_i) \le \sqrt{2} \,\kappa (F_i) \, \kappa (G)\). Combining this inequality with (58) and (59), we conclude the proof of (56). \(\square \)

4.3 Asymmetric norms

We estimate in this section the average cardinality of \(\#(\mathcal{T}(F^{\theta })),\,\theta \in [0,2 \pi ]\), for an arbitrary asymmetric norm \(F\) on \(\mathbb{R }^2\). Our strategy is similar to the case of symmetric norms, presented in the previous subsection: we construct a family \(F_1, \ldots , F_r\) of anisotropic euclidean norms such that \(\min \{ \varphi _{F_1}, \ldots , \varphi _{F_r}\} \le \varphi _F \le \max \{ \varphi _{F_1}, \ldots , \varphi _{F_r}\}\), and we use Proposition 4.8.

The construction the \((F_i)_{i=1}^r\) is however more subtle than in the previous section, and the integer \(r\) grows logarithmically with \(\kappa (F)\). The following technical lemma, illustrated on Fig. 9, is our first step.

Lemma 4.11

Let \(0< \varepsilon \le \pi /6\), and let \(\Phi \in C^0([0,2 \pi ], ]0 ,\pi [)\) be such that (i) \(\Phi \ge 2 \varepsilon \), (ii) \(\Phi -{{\mathrm{Id}}}\) is non-increasing, and (iii) for all \(0 \le t \le t^{\prime } \le 2 \pi \) one has

$$\begin{aligned} \int \limits _t^{t^{\prime }} {{\mathrm{cotan}}}\Phi (s) \, ds \le |\ln \varepsilon |. \end{aligned}$$
(60)

Let \((t_n)_{0 \le n \le N}\) be the finite sequence of elements of \([0,2\pi ]\) recursively defined as follows: \(t_0 := 0\), and \(t_{n+1}\) is the largest solution in \([0, 2 \pi ]\) of

$$\begin{aligned} \Phi (t)= \varepsilon +(t- t_n) \end{aligned}$$
(61)

if one exists. Otherwise the sequence ends.

Then \(N \le C |\ln \varepsilon |\), for some absolue constant \(C\) (independent of \(\varepsilon \) and \(\Phi \)).

Fig. 9
figure 9

Illustration of Lemma 4.11. Curve \(\Phi \). Broken line construction of \(t_0, \ldots , t_N\). The intersections of the broken line with the curve correspond to the equations (61). There is one vertical segment at each abscissa \(t_n,\,0 \le n \le N\). The chosen \(\Phi \) is \(\pi /2-\varphi _F\), or \(\pi /2-\varphi _{F^*}\), consistently with Proposition 4.12, with \(F(x,y) = \sqrt{x^2+y^2}-0.98\, x\)

Proof

Since \(t \mapsto \Phi (t) - t\) is continuous and non-increasing, the solutions of 61 are either the empty set, a singleton, or a closed interval. We denote \(\phi _n := \Phi (t_n)\) for all \(0 \le n \le N\), and observe that \(\phi _n \ge 2 \varepsilon \) by hypothesis (ii). We also define for \(0\le n < N\)

$$\begin{aligned} \delta _n := t_{n+1}-t_n = \phi _{n+1}-\varepsilon \ge 2 \varepsilon -\varepsilon = \varepsilon . \end{aligned}$$

In particular \(t_n \ge n\varepsilon \) for \(0\le n \le N\), and therefore \(N \le 2 \pi / \varepsilon \): the sequence is finite as announced. We establish below the finer estimate \(N \le C |\ln \varepsilon |\).

Consider the two collections of integers

$$\begin{aligned} E :=\{2, \ldots , N-1\}, \qquad E_+ := \{n \in E; \, \delta _{n-1} + \delta _n \le \pi /6\}. \end{aligned}$$

Note that

$$\begin{aligned} (\pi /6) \#(E \setminus E_+) \le \sum _{n \in E \setminus E_+} \left( \delta _{n-1}+\delta _n\right) \le 2 \sum _{0\le n <N} \delta _n = 2 (t_N-t_0) \le 4 \pi , \end{aligned}$$

and therefore \(\#(E\setminus E_+) \le c_0 := 24\). We next estimate the cardinality of \(E_+\). Consider an arbitrary \(n \in E_+\), we obtain recalling that \(\Phi -{{\mathrm{Id}}}\) is non-increasing

$$\begin{aligned} \int \limits _{t_n}^{t_{n+1}} {{\mathrm{cotan}}}\Phi (t) \, dt \ge \int \limits _0^{\delta _n} {{\mathrm{cotan}}}(\phi _n+t) \, dt = \ln \left( \frac{\sin (\phi _n+\delta _n)}{\sin \phi _n}\right) . \end{aligned}$$

We next define and estimate a quantity \(e_n\), attached to each \(n \in E_+\)

$$\begin{aligned} e_n := \ln \left( \frac{\sin (\phi _n)}{\sin (\phi _{n+1})}\right) + 2\int \limits _{t_n}^{t_{n+1}} {{\mathrm{cotan}}}\Phi \ge \ln \left( \frac{\sin (\phi _n+\delta _n)^2}{\sin (\phi _n) \sin (\phi _{n+1})}\right) . \end{aligned}$$
(62)

We have \(\sin (\phi _n) \le \phi _n\), and \(\sin (\phi _{n+1}) \le \phi _{n+1} = \varepsilon +\delta _n \le 2 \delta _n\), since \(\delta _n \ge \varepsilon \). On the other hand \(\sin (x) \ge \rho x\) for all \(x \in [0,\pi /3]\), by concavity of the sine function on this interval, with \(\rho := \sin (\pi /3)/(\pi /3)\). Observing that \(\phi _n+\delta _n= \varepsilon +\delta _{n-1}+\delta _n \le \pi /6+\pi /6=\pi /3\), we thus obtain \(\sin (\phi _n+\delta _n) \ge \rho (\phi _n+\delta _n)\). Injecting these inequalities in the right hand side of (62) we obtain:

$$\begin{aligned} \exp (e_n) \ge \frac{ \rho ^2(\phi _n+\delta _n)^2}{\phi _n(2 \delta _n)} = \frac{\rho ^2}{2} \left( \frac{\phi _n}{\delta _n}+\frac{\delta _n}{\phi _n}\right) ^2 \ge 2 \rho ^2 =1.36\ldots >1, \end{aligned}$$

where for the second inequality we used that \(x+x^{-1} \ge 2\) for all \(x>0\).

Let \(n, n+1, \ldots , n+k-1\) be consecutive integers in \(E_+\). Then

$$\begin{aligned} k \ln (2 \rho ^2)&\le \sum _{i=n}^{n+k-1} e_i \\&= \ln \left( \frac{\sin \phi _n}{\sin \phi _{n+k}}\right) + 2 \int \limits _{t_n}^{t_{n+k}} {{\mathrm{cotan}}}\Phi \\&\le \ln \left( \frac{\sin (\pi /2)}{\sin (2\varepsilon )}\right) +2 |\ln \varepsilon |\\&\le 3 |\ln \varepsilon | \end{aligned}$$

where we used in the third line the hypotheses (i) and (iii). Regarding the last line, we have by concavity \(\sin (2 \varepsilon ) \ge (2/\pi ) \varepsilon \ge \varepsilon \), thus \(-\ln \sin (2 \varepsilon ) \le |\ln \varepsilon |\). The maximal number \(k\) of consecutive integers in \(E_+\) is therefore bounded by \(c_1 |\ln \varepsilon |\), where \(c_1 := 3/\ln (2 \rho ^2)\).

The set \(E_+\) can be arranged into at most \(\#(E\setminus E_+)+1\) series of consecutive elements, and \(\#(E \setminus E_+) \le c_0 := 24\), see above. By the previous argument, these series have length at most \(c_1 |\ln \varepsilon |\). Finally

$$\begin{aligned} N = 2+\#(E\setminus E_+) + \#(E_+) \le 2+c_0+(c_0+1) c_1 |\ln \varepsilon |, \end{aligned}$$

which concludes the proof of this lemma. \(\square \)

Proposition 4.12

There exists a constant \(C\) such that the following holds. Let \(F\in \mathfrak{F }\), and let \(G\) be the norm defined by the diagonal matrix of entries \((\kappa ^{-1},\kappa )\), where \(\kappa := 4 \kappa (F)+1\).

Then there exists \(r \le C(1+\ln \kappa (F))\) and \(\theta _1, \ldots , \theta _r \in \mathbb{R }\) such that denoting \(\varphi _i := \varphi _G(\cdot -\theta _i)\) one has

$$\begin{aligned} \min \{\varphi _1, \ldots , \varphi _r\} \le \varphi _F \le \max \{\varphi _1, \ldots , \varphi _r\}. \end{aligned}$$
(63)

Proof

We define \(\Phi \in C^0([0,2\pi ], [0,\pi ])\) by \(\Phi (t) := \pi /2-\varphi _F(t)\). The difference \(\Phi -{{\mathrm{Id}}}\) is non-increasing since \(\varphi _F+{{\mathrm{Id}}}\) is non-decreasing, see Proposition 4.6. For all \(t \in [0,2\pi ]\) we have \(|\varphi _F(t)| \le \arccos (1/\kappa (F))\), using again Proposition 4.6, hence \(\Phi (t) \ge \arcsin (1/\kappa (F)) \ge 1/\kappa (F)\). Last for \(0 \le t \le t^{\prime } \le 2 \pi \), one obtains using (46)

$$\begin{aligned} \int \limits _t^{t^{\prime }} {{\mathrm{cotan}}}\Phi = \int \limits _t^{t^{\prime }} \tan \varphi _F \le \ln \kappa (F). \end{aligned}$$

Therefore \(\Phi \) satisfies the assumptions of Lemma 4.11, with \(\varepsilon := \min \{\pi /6,\, 1/ (2 \kappa (F))\}\). Let \(t_0, \ldots , t_N\) be the finite sequence given by this Lemma. We have \(N \le C |\ln \varepsilon | \le C^{\prime } (1+\ln \kappa (F))\) for some absolute constant \(C^{\prime }\). Using (61) and the fact that \(\Phi -{{\mathrm{Id}}}\) is non-decreasing, we obtain \(\Phi (t) \ge \varepsilon + (t-t_n)\) for all \(0 \le n \le N\), and all \(t_n \le t \le t_{n+1}\), and therefore

$$\begin{aligned} \varphi _F(t) \le \pi /2 -\varepsilon - (t-t_n). \end{aligned}$$

We next observe, using Lemma 4.9 and with \(\Theta := \arctan (1/\kappa )\), that

$$\begin{aligned} \varphi _G(\Theta ) = \arctan \left( \frac{\kappa -\kappa ^{-1}}{2}\right) \ge \frac{\pi }{2} - \frac{2}{\kappa -\kappa ^{-1}} \ge \frac{\pi }{2} - \varepsilon , \end{aligned}$$

where we used successively that \(\arctan (x) \ge \pi /2-1/x\) for all \(x>0\), and that \(\kappa -\kappa ^{-1} \ge (4 \kappa (F)+1) - 1 \ge 4 \kappa (F) \ge 2/\varepsilon \). Therefore \(\varphi _G(\Theta +t) \ge \pi /2-\varepsilon -t\), for all \(t \ge 0\), using 47. Denoting \(\theta _i := \Theta - t_i\) for all \(0 \le i \le N\), and \(\varphi _i := \varphi _G(\cdot -\theta _i)\), we conclude that

$$\begin{aligned} \varphi _F \le \max \{\varphi _0, \ldots , \varphi _N\}, \end{aligned}$$

on \([0,2\pi ]\), hence also on \(\mathbb{R }\) by \(2\pi \)-periodicity. We have obtained one side of the announced inequality (63).

For the other side we define \(\hat{\Phi }(t) := \pi /2+\varphi _F(-t)\), obtain \(\hat{t}_0, \ldots , \hat{t}_{\hat{N}}\) using Lemma 4.11, with again \(\hat{N} \le C^{\prime } (1+ \ln \kappa (F))\). Setting \(\hat{\theta }_i := -\Theta + \hat{t}_i\) and \(\hat{\varphi }_i := \varphi _G(\cdot -\hat{\theta }_i)\), for \(0 \le i \le \hat{N}\), we obtain likewise \(\varphi _F \ge \min \{\hat{\varphi }_1, \ldots , \hat{\varphi }_{\hat{N}}\}\). This concludes the proof with \(r=N+\hat{N}\). \(\square \)

We conclude in the next corollary the proof of main result of this paper: the average estimate of \(\#(\mathcal{T}(F^{\theta })),\,\theta \in [0,2 \pi ]\), for an arbitrary asymmetric norm \(F\).

Corollary 4.13

There exists a constant \(C\) such that for any asymmetric norm \(F\) on \(\mathbb{R }^2\), one has

$$\begin{aligned} \int \limits _0^{2 \pi } \#(\mathcal{T}(F^{\theta })) \, d\theta \le C (1+\ln \kappa (F))^3. \end{aligned}$$
(64)

Proof

In view of Lemmas 3.8 and 3.11, we can assume that \(F\in \mathfrak{F }\).

Let \(\kappa ,\,G,\,r\) and \(\theta _1, \ldots , \theta _r\) be as in Proposition 4.12. Applying successively Proposition 4.8 and Corollary 4.10 we obtain

$$\begin{aligned} \int \limits _0^{2\pi } \#(\mathcal{T}(F^{\theta })) \, d \theta&\le \sum _{1 \le i \le r} \int \limits _0^{2 \pi } \#(\mathcal{T}(G^{{\theta }_i+\theta })) \, d\theta \\&\le \sum _{1 \le i \le r} C (1+\ln \kappa (G))^2\\&= r \, C (1+2\ln \kappa )^2. \end{aligned}$$

Recalling that \(r \le C^{\prime } (1+ \ln \kappa (F))\) and \(\kappa = 4\kappa (F)+1\), see Proposition 4.12, we obtain the announced result. \(\square \)

5 Implementation and numerical results

We compare in this section the algorithm introduced in this paper, FM-ASR, with two alternative solvers of the Escape Time problem, or Anisotropic Eikonal Equation, which enjoy a reputation of efficiency an simplicity in applications [3]: the Adaptive Gauss Siedel Iteration (AGSIFootnote 7) of Bornemann and Rasch [4], and Fast Marching using the \(8\) point stencil (FM-\(8\)). Stencils are illustrated on Fig. 2. Two more recent methods were also implemented: the Monotone Acceptance Ordered Upwind Method (MAOUM) of Alton and Mitchell [2] is tested when its memory usage allows it, and Fast Marching using Lattice Basis Reduction (FM-LBR) of the author [8] in the special case of Riemannian metrics.

Four test cases are considered: two involving (asymmetric) Finsler metrics, and two involving Riemannian metrics. Three of these tests are directly motivated by applications, including motion planning, seismic imaging, and image segmentation, while the fourth one has the advantage of having an analytic solution, avoiding the recourse to a reference solution. Depending on the test, the metric anisotropy \(\kappa (\mathcal{F})\) ranges from \(4\) to \(400\). Each algorithm was executed on each test case, at \(100\) different resolutions \(n\times n\), where \(n\) ranged from \(61\) to \(1201\) (odd values of \(n\) are preferred for symmetry reasons). We compare the algorithm’s efficiency by representing, on Figs. 10, 11, 12 and 13, their \(L^\infty \) or averaged \(L^1\) numerical error, with respect to an exact or reference solutionFootnote 8, as a function of CPU time. We also discuss accuracy resolution-wise in the text: which resolution \(n\) is required to meet a prescribed \(L^\infty \) error bound?

Fig. 10
figure 10

Level lines of the first test case [15]. \(L^\infty \) error (center) and averaged \(L^1\) error (right), with respect to a reference solution, plotted as a function of CPU time. Data obtained by running the algorithms at \(100\) different resolutions \(n \times n\), with \(n\) ranging from 61 to 1,201. Best viewed in color. FM-ASR blue, FM-8 brown, AGSI green, MAOUM orange. See Figs. 11, 12 and 13 for the other tests

Fig. 11
figure 11

Level lines are circles in the the second test case. The shortest path joining \(r e_\theta \) to the origin, where \(e_\theta := (\cos \theta , \sin \theta )\), is the spiral \(\varphi \mapsto (r-\varphi ) e_{\theta -\varphi },\,\varphi \in [0,r]\) (red curve)

Fig. 12
figure 12

Test case inspired by seismic imaging (taken from [15], Fig. 6, top left), with moderate anisotropy \(\kappa (\mathcal{F})=4\). Riemannian metric \(\mathcal{F}_z(u) := \sqrt{\langle u, \mathcal M (z) u\rangle }\), where \(\mathcal M (z)\) has eigenvalues \(0.8^{-2},0.2^{-2}\), the former associated to the eigenvector \((1, (\pi /2) \cos (4 \pi x))\). Domain \([-0.5,0.5]^2\). Target \(L^\infty \) error bound \(2\times 10^{-2}\) is met by the AGSI in CPU time 4.3 s, at resolution \(n=375\), and by the FM-ASR in CPU time 0.18 s (\(24\) times less), at resolution \(n=239\)

Fig. 13
figure 13

Test case inspired by tubular image segmentation, with strong anisotropy \(\kappa (\mathcal{F})=100\), Fig. 4 in [3]. The Riemannian metric is equal to the euclidean norm, except on a band of width \(1/100\) along a spiraling curve \(\Gamma \) where it has eigenvalues \(1/100^2, 1\), the former associated to the tangent vector to \(\Gamma \). See [8] for details. Target \(L^\infty \) error bound \(0.5\) is met by the AGSI in CPU time 1,015 s, at resolution \(n=1,135\), and by the FM-ASR in CPU time 0.054 s (\(22,700\) times less), at resolution \(n=157\)

In practical applications [3], the choice of the FM-\(8\) versus the AGSI is typically regarded as a compromise in favor, respectively, of CPU time or of numerical accuracy. Indeed the FM-\(8\) is a single pass solver with a small stencil, which thus completes in short and predictable CPU time, almost independent of the problem solved. For instance the FM-\(8\) completes our four benchmarks in CPU timeFootnote 9 0.77, 0.79, 0.86 and 0.79 s respectively, on a \(601 \times 601\) grid, while the AGSI takesFootnote 10 8.61, 285, 15.1 and 123 s. On the other hand the results produced by the AGSI are known to converge towards the viscosity solution of the continuous problem, as one refines the discretization grid, whereas convergence can only be guaranteed in limited cases for the FM-\(8\). Indeed the acuteness condition (iii) in Definition 2.1 can be guaranteed for a Finsler metric \(\mathcal{F}\) such that \(\kappa (\mathcal{F}) \le \sqrt{2}\) [using (35)], a Riemannian metric such that \(\kappa (\mathcal{F}) \le \sqrt{2}+1\) (using Proposition 1.2 in [8]), or axis aligned anisotropy [1]. If this condition is violated, then there is no convergence guarantee. Our objective is to bring together the best of both worlds: our algorithm is fastFootnote 11 (1.39, 3.09, 1.32 and 1.11 s with the above settings) and universally convergent.

The MAOUM [2] and the FM-LBR [8] are more recent algorithms than the AGSI or the FM-8, and are closer to FM-ASR from a theoretical point of view: they are universally convergent, inspired by Dijkstra’s algorithm, and use static stencils assembled in a pre-processing step. However the MAOUM uses large isotropic stencils, see Fig. 2, instead of smaller anisotropic stencils for the FM-ASR, resulting in a larger complexity and memory footprint. The FM-LBR mainly distinguishes itself from the FM-ASR by its domain of application: it is restricted to Riemannian metrics, but extends to dimension \(3\).

Our first two tests involve asymmetric norms defined as the sum of an anisotropic euclidean norm and of a linear form.

Proposition 5.1

Let \(M\in S_2^+\) and let \(\omega \in \mathbb{R }^2\) be such that \(\langle \omega ,M \omega \rangle <1\). The map \(F : \mathbb{R }^2 \rightarrow \mathbb{R }\) defined by

$$\begin{aligned} F(u) := \sqrt{\langle u,M u\rangle } - \langle \omega ,M u\rangle \end{aligned}$$

is an asymmetric norm, which unit ball \(\{z; \, F(z) \le 1\}\) is an ellipse, not centered at the origin if \(\omega \ne 0\). Furthermore the dual asymmetric norm \(F^*\) has the same form, with parameters \(M_*, \omega _*\) defined by

$$\begin{aligned} \delta :=1-\langle \omega ,M \omega \rangle , \quad M_* := \frac{\omega \omega ^\mathrm T + \delta M^{-1}}{\delta ^2}, \quad \omega _* := - M_*^{-1} \omega /\delta . \end{aligned}$$

The minimization problem (13), appearing in the Hopf-Lax update operator, and the evaluation of the predicate “\(u,v\) form an \(F\)-acute angle”, cost numerically \(\mathcal O (1)\) operations \(+,\, -,\, \times ,\, /, \,\sqrt{\cdot }\) among reals.

Proof

Up to a linear change of variables (by \(M^\frac{1}{2}\)), we may assume that \(M={{\mathrm{Id}}}\), and thus \(F(u) = \Vert u\Vert -\langle \omega ,u\rangle \), with \(\Vert \omega \Vert <1\). The \(1\)-Homogeneity and the Convexity of \(F\) are obvious. Furthermore \(F(u) \ge \Vert u\Vert (1-\Vert \omega \Vert ) \ge 0\), with equality if and only if \(u=0\), which shows that \(F\) is proper, hence is an asymmetric norm. The boundary of the compact and convex set \(\{z\in \mathbb{R }^2;\, F(z) \le 1\}\) is characterized by the inhomogeneous quadratic equation \(\Vert u\Vert ^2 = (1+\langle \omega ,u\rangle )^2\), which first degree term \(u \mapsto 2 \langle \omega ,u\rangle \) is non-zero if \(\omega \ne 0\). Hence this set is an ellipse, non-centered if \(\omega \ne 0\).

Consider an arbitrary \(u\in \mathbb{R }^2 {\setminus } \{0\}\). Observing that \(1/F^*(u) \!=\! \min \{F(v); \, \langle u,v\rangle \!=\! 1\}\), we find using the Khun-Tucker conditions for this constrained optimization problem, that the minimizer \(v\) satisfies \(v/\Vert v\Vert - \omega = \lambda u\) for some \(\lambda \in \mathbb{R }\). Taking the scalar product of this equation with \(v\) we obtain \(\lambda =1/F^*(u)\). On the other hand observing that \(\Vert \omega +\lambda u\Vert = 1\), we obtain a quadratic equation which positive root is \(\lambda \). The announced expression of \(F^*(u)\) follows.

Since the norm \(F\) is differentiable, evaluating the predicate “\(u,v\) form an acute angle” is straightforward. It was observed in the very first works on fast marching methods [17] that in the special case \(\omega =0\), the minimization problem (13) amounts to solving a quadratic equation. Choosing a non-zero \(\omega \) is equivalent to subtracting \(\langle \omega ,u\rangle \) to \(d_u\) (resp. \(\langle \omega ,v\rangle \) to \(d_v\)), thus the problem (13) has an equally simple solution. \(\square \)

Our first test is a motion planning control problem, also discussed in [4, 15]. The Finsler metric is given by its dual: \(\mathcal{F}^*_z(u) = \Vert u\Vert +\langle \omega (z),u\rangle \), where \(\omega (x,y) = -\gamma \sin (4 \pi x) \sin (4 \pi y)\) and \(\gamma = 0.9\). The speed profile \(\{u\in \mathbb{R }^2; \, \mathcal{F}_z(u) \le 1\}\), in the control theoretic interpretation, is the euclidean unit ball translated by \(\omega (z)\), see Fig. 1 (right): this could model a boat, able to move at unit speed on still water, but caught in an ocean current of speed \(\omega (z)\). We compute the distance, i.e. the minimal travel time, to the center of the square domain \([-0.5,0.5]^2\). See e.g. [8] for a discussion on shortest path extraction. The maximum anisotropy ratio, \(\kappa (\mathcal{F}) = (1+\gamma )/(1-\gamma )=19\), is not small, but anisotropy is pronounced only on a small region, where \(|\sin (4 \pi x) \sin (4 \pi y)|\) is close to \(1\). As a result, the FM-8 delivers excellent results in terms of averaged \(L^1\) error, and best results in terms of \(L^\infty \) error for CPU times \(\le \)1 s, after what (presumed) non-convergence begins to show and the FM-ASR outperforms it. The FM-ASR is the best method among those which benefit from a convergence guarantee: for the prescribed tolerance \(5 \times 10^{-3}\) on the \(L^\infty \) error, the AGSI takes 11.3 s, at resolution \(n=661\), while the FM-ASR takes 0.51 s, at resolution \(n=375\), thus reducing CPU time by a factor 22.

Our next test case is based on the following proposition.

Proposition 5.2

Let \(g \in C^0(\mathbb{R }_+,]-1,1[)\), and let \(\mathcal{F}\) be the Finsler metric on \(\mathbb{R }^2\setminus \{0\}\) defined by

$$\begin{aligned} \mathcal{F}_z(u) = \Vert u\Vert - \frac{g(\Vert z\Vert )}{\Vert z\Vert } \langle z^\perp , u\rangle , \end{aligned}$$
(65)

where \(z^\perp \) denotes the rotation of \(z\) by \(\pi /2\). Then the length \(D(z)\) of the shortest path joining \(z\) to the origin, solution of the eikonal equation (3) on \(\Omega := \mathbb{R }^2 \setminus \{0\}\), is given by

$$\begin{aligned} D(z) = \int \limits _0^{\Vert z\Vert } \sqrt{1-g(r)^2}\, dr. \end{aligned}$$
(66)

Proof

Let \(z=r\omega \), where \(r>0\) and \(\Vert \omega \Vert =1\), and let \(V(z) := g(r) \, \omega ^\perp - \sqrt{1-g(r)^2} \,\omega \). We have

$$\begin{aligned} \mathcal{F}_z(u) + \sqrt{1-g(r)^2} \langle \omega ,u\rangle = \Vert u\Vert - \langle V(z), u\rangle \ge 0, \end{aligned}$$
(67)

since \(\Vert V(z)\Vert =1\), with equality if \(u\) is positively proportional to \(V(z)\).

Let \(\gamma \in C^1([0,1], \mathbb{R }^2)\) be such that \(\gamma (0)=z,\,\gamma (1) = 0\). We may assume that \(\gamma (t)\ne 0\) for all \(t<1\), up to eliminating a loop starting and ending at the origin at the end of the path \(\gamma \). For all \(t\in [0,1[\), let \(r(t) := \Vert \gamma (t)\Vert >0\) and let \(\omega (t) := \gamma (t)/r(t)\). Note that \(\langle \omega (t),\gamma ^{\prime }(t)\rangle = r^{\prime }(t)\). We obtain using (67)

$$\begin{aligned} {{\mathrm{length}}}(\gamma )&:= \int \limits _0^1 \mathcal{F}_{\gamma (t)} (\gamma ^{\prime }(t)) \, dt \ge -\int \limits _0^1 \sqrt{1-g(r(t))^2} \, \langle \omega (t), \gamma ^{\prime }(t)\rangle \, dt \\&= \int \limits _1^0 \sqrt{1-g(r(t))^2} \, r^{\prime }(t) \, dt, \end{aligned}$$

with equality if \(\gamma ^{\prime }(t)\) is positively proportional to \(V(\gamma (t))\) for all \(t\in [0,1[\) (a path of minimal length can therefore be obtained by solving an ordinary differential equation). Observing that the right hand side of (66) and of the last equation coincide, we obtain the announced result. \(\square \)

For our second test case, we chose the Finsler metric \(\mathcal{F}\) given by \(g(r) := r/\sqrt{1+r^2}\) in (65), in such way that \(D(z) = {{\mathrm{arcsinh}}}(\Vert z\Vert )\). The problem was discretized on a the square domain \(Q := [-r_0,r_0]^2\), where \(r_0=10\), which contains the disk \(B := \{z\in \mathbb{R }^2; \, \Vert z\Vert \le r_0\}\). Due to the allure of the paths of minimal length for the continuous problem, spirals, see Fig. 11, the convergence of the discrete solution towards the continuous one can only be guaranteed within the disk \(B\). Grid points that do not belong to \(B\) are thus rejected when computing errors. The maximum anisotropy ratio on the disk \(B\) is \(\kappa (\mathcal{F}_{|B}) = (r_0+\sqrt{1+r_0^2})^2 \simeq 402\), which is quite pronounced, and unsurprisingly the FM-\(8\) non-convergence shows early. Due to the strong anisotropy, the MAOUM produced huge stencils, leading to a memory footprint incompatible with our equipment. Unlike other test cases, the AGSI produced here the most accurate results resolution-wise: for the prescribed tolerance \(5 \times 10^{-2}\) on the \(L^\infty \) error, the AGSI takes 119 s, at resolution \(n=435\), while the FM-ASR takes 10.7 s, at resolution \(n=1,069\). Despite the higher resolution, the FM-ASR strongly reduces the CPU time needed to achieve a prescribed \(L^\infty \) error bound, here by a factor 11.

Two more test cases, involving Riemannian metrics, are illustrated on Figs. 12 and 13. They are inspired by seismic imaging and medical image segmentation respectively, and were originally proposed in [15] and [3], see also [8]. The efficiency of the FM-ASR and of the FM-LBR [8] are comparable, and their superiority over alternative methods is here unquestionable. In the last test these two methods are in a class of their own, often reducing CPU time by four(!) orders of magnitude in comparison with their alternatives, for a target \(L^\infty \) error bound.

6 Conclusion

We introduced in this paper a variant of the fast marching algorithm, which applies to arbitrary Finsler metrics, on two dimensional domains discretized on a grid, and which is particularly efficient in the context of large anisotropies. Its complexity depends only (poly-)logarithmically on the anisotropy ratio \(\kappa (\mathcal{F})\) of the given Finsler metric, in an average sense over grid orientations, whereas earlier methods had a linear or polynomial dependence in this parameter. Numerical experiments show a reduction by an order of magnitude, or more, of the CPU time required to meet a target error bound. Future work will be devoted to the analysis of the accuracy of this algorithm, its extension to higher dimensions and to triangulated domains, and its application to image analysis.