Suppose I have the set of points
x1 = c(0,3,6)
x2 = c(0,3,6)
and I want to interpolate the function
y <- function(x){x[1]^2 + x[2]^2}
On set the set of points such that
x1 + x2 <= 6.
That is...
z =
x1 x2
0 0
0 3
3 0
6 0
0 6
In reality, I do not know the function, but I know it's evaluation on each point of z
.
The interpolation will fill in the gaps for any point in this set. For example, using the linear interpolation, I could evaluate it on anything in the rectangle
x1 + x2<=6