Barycentric interpolation function implemented.