working algorithm to make line interpolation for the Neufeld Solution