Implementation of "Fast Marching" distance transform for smooth grids. Almost works.
improvements of DistanceTransform