Appearance
Initial centerline from a harmonic field
Construction
Let the open wall
where
with centerline.level_sets, preceded by the centroid of

Harmonic field u on a synthetic aortic arch, a few of its level sets (white) and the centroids of 128 level sets (red), which form the initial centerline.
Loading the model…
Drag to rotate, scroll or pinch to zoom, right-drag to pan
The same field in 3D.
Why this works
Compared with centerlines from medial axes, distance transforms or minimal paths, this needs no volumetric discretization, has no tunable parameters, and costs one sparse linear solve.
Discretization
After eliminating the Dirichlet vertices the matrix is symmetric positive definite; it is factorized with a sparse Cholesky decomposition (faer). Level sets of the piecewise linear
The centroids are then fitted by a smoothing spline with a physical cut-off length; see Centerline.