Advanced maths

Eikonal arrival time calculator on a variable speed grid

Approximate first-arrival times on a positive-speed Cartesian grid with a monotone upwind Eikonal scheme.

Your numbers

One grid row per line. Values must be strictly positive.
Use the declared nodal source convention shown in the page limitations.
Enter finite values within the stated bounds; coordinate rows may use commas.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Approximate first-arrival times on a positive-speed Cartesian grid with a monotone upwind Eikonal scheme.

THE FORMULA|∇T|=1/F; max(T−a,0)²+max(T−b,0)²=(h/F)².

A worked example

A5×5 unit-speed grid with center source and spacing 0.25 gives axis-neighbor time 0.25 and corner time≈0.8131089267 under the first-order discrete scheme.

Good to know

3–25 rows and columns, positive speeds≤1000, one valid source node and uniform positive spacing≤1000. First-order fast sweeping with upwind residual; no outside-neighbor travel, anisotropy or exact continuous-distance guarantee.

Arrival time in a continuous-speed model

The Eikonal equation describes how a first-arrival time field changes with local travel speed. For isotropic speed F, the gradient magnitude of T equals one divided by F. A point source supplies arrival time zero and propagation extends through the available grid.

A graph shortest path moves along a prescribed collection of edges. The upwind Eikonal update instead combines information from coordinate directions to approximate an isotropic wavefront. Its answer need not equal either a four-neighbor graph distance or the exact Euclidean distance on a coarse Cartesian mesh.

A discrete point-source arrival fieldSource: row2,column2Axis neighbor = 0.25Corner ≈ 0.813109
Scroll across to see the full diagram.
At unit speed and spacing 0.25, the first axis neighbor arrives at 0.25; the corner is about 0.813109.

Compare this with the Dubins shortest path calculator between oriented points. Approximate a continuous isotropic travel-time field with upwind Eikonal updates, rather than route only along graph edges.

Grid layout and units

Each input row is one grid row of positive speed values. The source is a zero-based row and column pair, and spacing is the common physical distance between neighboring nodes in either direction. A speed in meters per second and spacing in meters produce arrival times in seconds.

The model uses only the entered grid domain. Missing outside neighbors do not create shortcut paths beyond its boundary. Speeds cannot be zero or negative; an obstacle or an impassable cell would require a separate domain convention rather than a zero inserted into a denominator.

The central-source worked example

The default has five rows and five columns, all with speed one. The central source is row two, column two, and spacing is one-quarter. Adjacent axis nodes have arrival time one-quarter, and nodes two steps directly along an axis have time one-half.

The corner result is approximately 0.8131089267, larger than the continuous straight-line distance square root of one-half. That difference is expected first-order grid bias near a point source. It is not evidence that the local speed changed or that the calculation is an exact Euclidean distance transform.

The local quadratic update

At a node, the smaller available time from each coordinate direction supplies two upwind values. When their difference is large, only the earlier direction determines the update. Otherwise a quadratic equation combines both values to satisfy the discrete gradient-magnitude relation.

The larger admissible root preserves causality by not assigning a time earlier than the relevant incoming values. The implementation also keeps the minimum of the old value and the new candidate. This monotone decrease from initially infinite nonsource values prevents an arbitrary iteration order from increasing an already improved estimate.

Sweeping in several directions

A single pass can propagate information efficiently only in some directions. The algorithm therefore visits the grid in four combinations of row and column order. Repeating these sweeps allows arrivals coming from different source directions to influence all relevant nodes.

Convergence is checked through the largest update change, with a finite sweep cap. Afterward, the original upwind gradient equation is evaluated at every nonsource node. A small iteration change without a matching equation residual would not be accepted as a solved discrete field.

Residual versus discretization error

The upwind residual measures agreement with the finite-difference equations. It does not bound the difference from a continuous travel-time solution. A coarse grid can solve its own equations accurately while still approximating curved fronts or sharp speed changes poorly.

For a resolution study, repeat the calculation on a finer grid representing the same physical speed field and domain. Keep the source location, spacing units and interpolation convention consistent. This page does not automatically fabricate a finer speed field from an arbitrary sampled matrix or present two matching iterations as a continuum error certificate.

Interpreting an arrival-time map

Use the table to inspect propagation patterns and speed effects, not to infer a unique physical ray path. Several routes can arrive at the same time, and tracing characteristics requires another procedure. The first-order field can also smooth details that the entered grid cannot resolve.

For anisotropic media, obstacles, nonuniform spacing or large domains, choose a solver that implements those features explicitly. This calculator exposes a small isotropic upwind model with convergence checks. Its finite-domain and point-source assumptions remain part of every exported arrival time.

A few questions, answered

Is this ordinary graph shortest path?

No. The update combines coordinate-direction arrivals to approximate the isotropic Eikonal equation.

Why is a corner slower than exact Euclidean distance?

A coarse first-order grid has discretization bias, especially near a point source.

Does a small residual certify the continuous solution?

No. It verifies the discrete equations, not a rigorous continuum error bound.

Can zero speed mark an obstacle?

No. All speeds must be positive; obstacles need a separate supported domain convention.

Find your calculator

Start typing to explore the library.