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

1

5

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.

Ist answered 25/5, 2015 at 7:40 Comment(8)
It seems you have to tell us what you mean.Functional
What do you mean exactly?Bordelon
I mean i need the manage multi point linear interpolation not two point. For example 4 point is known how can i calculate the interpolation value ?Ist
If you have four points, there is no guarantee to have a line passing through them. You need a least square line or regression line that consider possibly different metrics to minimize the error passing through themBordelon
Maybe you are looking for spline interpolation. It's hard to tell what you mean.Biting
Do you mean Linear Regression? en.wikipedia.org/wiki/Linear_regressionTilla
Is this useful?Pinckney
@Pinckney yes but its depends your needs.Ist
S
9

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:

  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...

[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:

Sile answered 25/5, 2015 at 12:54 Comment(5)
@Ist glad to be of help. btw the image was hand/mouse drawed in paint so it is not exact... the orange curve (option 2) is almost the same as green curve (option 3) from the start but more distant from start it should oscillate more and more usually the oscillations for many points get much bigger then the curve shape itself ...Sile
Thanks a lot i did not know the name piecewise linear interpolation. And this is exactly what i want.Ist
You can certainly do interpolation with splines as well. en.wikipedia.org/wiki/Spline_interpolationBiting
Hey, I think spline in malab, or rather spline generally speaking, is indeed an interpolant. This is really what you see in the wikipedia page as well. Am I wrong?Layman
@AmirSagiv I do not use Matlab but Bezier and splines in general are approximations ... that means that the curve does not necessarily go through all of the control points. However there are few forms of SPLINES that resembles interpolation like Catmul-Rom. And there are also techniques that do the same like duplicating control points etc...Sile

© 2022 - 2024 — McMap. All rights reserved.