https://123dok.net/document/y6epm0nz-riemannian-fast-marching-on-cartesian-grids-using-voronoi-s-first-reduction-of-quadratic-forms.html