The method you can use for interpolating and bi cubic interpolation is described below (the noob way obviously):
static double Interpolate(double z, double[] height)
{
return height[1] + 0.5 * z * (height[2] - height[0] + z
* (2.0 * height[0] - 5.0 * height[1] + 4.0 * height[2] - height[3] + z
* (3.0 * (height[1] - height[2]) + height[3] - height[0])));
}
No comments:
Post a Comment