Constrained interpolation and smoothing