Dual linear online interpolator between 4 values

The interpolation method is a method that allows you to find intermediate values of a value from an existing discrete set of known values.

x1

x  (между х1 и х2)

x2

y1

f(x1, y1)

f(x2, y1)

y (между yи y2)

f(x,y)=0.00

y2

f(x1, y2)

f(x2, y2)

In this online calculator, double linear interpolation is performed for the function f (x, y), if the value of x is in the interval between x1 and x2, y is in the interval between y1 and y2 and the values of the function f (x1), f (x2) are known, f (y1), f (y2)

Therefore, the interpolation formula has the following form:

At the beginning we find: f(x,y1)= (f(x2,y1)-f(x1,y1))/(x2-x1)*(x-x1)+f(x1,y1),

and then we find: f(x,y2)= (f(x2,y2)-f(x1,y2))/(x2-x1)*(x-x1)+f(x1,y2),

and then we find  f(x,y)= (f(x,y2)-f(x,y1))/(y2-y1)*(y-y1)+f(x,y1),