Thin-plate-spline Implementation