Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i produce multi point linear interpolation? [closed]

I have a linear interpolation methods. This is calculate interpolate value when (x1,y1) (x2,y2) and x0 known. it is calculate y0 value. But i need the do that when multi point known.

I am not talking about Bilinear or Trilinear interpolation.

like image 732
EmreS Avatar asked May 25 '15 07:05

EmreS


1 Answers

For multi point interpolation there are 3 options:

img

  1. piecewise linear interpolation

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

    example of linear DDA on integers and more is in here:

    • Precise subpixel line drawing algorithm (rasterization algorithm)
  2. polynomial interpolation

    this is not linear !!! Take all known points, compute n-th degree polynomial from it (by Lagrange polynomial or by edge conditions or by regression/curve fitting or by whatever else) and compute the point from parameter as function of this polynomial. Usually you have one polynomial per axis the more the points and or degree of polynomial the less stable the result (oscillations).

  3. piecewise polynomial interpolation

    It is combination of #1,#2 (n is low to avoid oscillations). You need to call the point sequence properly to manage continuity between segments, the edge conditions must take into account previous and next segment...

    • here Piecewise interpolation cubic example
    • here How to construct own interpolation 3th degree polynomial
    • here How to construct own interpolation 4th degree polynomial
    • here point call sequence and BEZIER cubic as interpolation cubic

[notes]

SPLINE,BEZIER,... are approximation curves not interpolation (they do not necessarily cross the control points). There is a way how to convert in-between different types of curves by recomputation of control points. For example see this:

  • Interpolation cubic vs. Bezier cubic
like image 172
Spektre Avatar answered Sep 24 '22 15:09

Spektre