Transform cartesian to curvilinear orthogonal coordinates, e.g. a flow-oriented coordinate system.
Author: Juernjakob Dugge
Nice submission overall.
A warning though: the spline interpolant is not necessarily monotone, particularly at the end-points. As a result, in my tests it was common to get major discontinuities in "Nsign" at the boundaries.
You might consider adding a pchip() option to avoid this (pchip is guaranteed monotone).