Linear and quadratic interpolation