用f(x1,y1)f(x_1,y_1)f(x1,y1)表示位置(x1,y1)(x_1,y_1)(x1,y1)处的值,相当于一共三个维度,固定一个维度,根据另外两个维度的两个点确定一条直线,两个蓝色点(x,y1)(x,y_1)(x,y1)和(x,y2)(x,y_2)(x,y2)分别在line1color{blue}line_1line1和line2color{blue}line_2line2,红色点(x,y)(x,y)(x,y)在line3color{red}line_3line3上,也就是插值位置,最后求f(x,y)color{red}oxed{fleft(x,y ight)}f(x,y)
固定yyy,根据两个上顶点和两个下顶点:{(x1,f(x1,y1))(x2,f(x2,y1))→line1(x1,f(x1,y2))(x2,f(x2,y2))→line2left{(x1,f(x1,y1))(x2,f(x2,y1))→line1(x1,f(x1,y2))(x2,f(x2,y2))→line2(x1,f(x1,y1))(x2,f(x2,y1))→line1(x1,f(x1,y2))(x2,f(x2,y2))→line2egin{aligned}left(x_1,f(x_1,y_1) ight);;;left(x_2,f(x_2,y_1) ight) oline_1\left(x_1,f(x_1,y_2) ight);;;left(x_2,f(x_2,y_2) ight) oline_2end{aligned} ight.{(x1,f(x1,y1))(x2,f(x2,y1))→line1(x1,f(x1,y2))(x2,f(x2,y2))→line2固定xxx,根据两个蓝色交点:(y1,f(x,y1))、(y2,f(x,y2))→line3left(y_1,f(x,y_1) ight)、left(y_2,f(x,y_2) ight) oline_3(y1,f(x,y1))、(y2,f(x,y2))→line3
推导整理三条直线得到:f(x,y1)≈x2−xx2−x1f(x1,y1) x−x1x2−x1f(x2,y1)line1f(x,y2)≈x2−xx2−x1f(x1,y2) x−x1x2−x1f(x2,y2)line2f(x,y)≈y2−yy2−y1f(x,y1) y−y1y2−y1f(x,y2)line3⇓f(x,y)≈f(x1,y1)(x2−x1)(y2−y1)(x2−x)(y2−y) f(x2,y1)(x2−x1)(y2−y1)(x−x1)(y2−y) f(x1,y2)(x2−x1)(y2−y1)(x2−x)(y−y1) f(x2,y2)(x2−x1)(y2−y1)(x−x1)(y−y1)egin{aligned}