How can I do multi-point linear interpolation?

I have linear interpolation methods. This computes the interpolation value when (x1, y1) (x2, y2) and x0 are known. it calculates the value of y0. But I need to do this when several points are known.

I am not talking about bilinear or trilinear interpolation.

+5
source share
1 answer

For multipoint interpolation, there are 3 options:

img

  • piecewise linear interpolation

    select the 2 closest points to your known coordinate, if you use a parameter, then select the points containing the parameter range, and change the parameter range / scale to the interpolation range (usually <0,1> ) and interpolate as linear interpolation.

  • polynomial interpolation

    it is not linear !!! Take all the known points, calculate from it a polynomial of degree n-th (Lagrange polynomial or boundary conditions or a regression / curve substitution, or any other) and calculate the point from the parameter as a function of this polynomial. Usually you have one polynomial per axis, the larger the points and the degree of the polynomial, the less stable the result (fluctuations).

  • piecewise polynomial interpolation

    This is a combination of # 1, # 2 ( n is low to avoid hesitation). You must correctly name the sequence of points to control the continuity between segments, boundary conditions must take into account the previous and next segments ...

[notes]

SPLINE, BEZIER , ... are approximation curves, not interpolation (they do not necessarily intersect control points). There is a way to convert between different types of curves by recalculating control points. For example, see This:

+7
source

Source: https://habr.com/ru/post/1273997/


All Articles