如何产生多点线性插值? [英] How can i produce multi point linear interpolation?

查看:495
本文介绍了如何产生多点线性插值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个线性插值方法.当(x1,y1)(x2,y2)和x0已知时,这是计算插值的方法.它是计算y0的值.但是当多点已知时,我需要这样做.

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.

推荐答案

对于多点插值,有3个选项:

For multi point interpolation there are 3 options:

  1. 分段线性插值

如果使用参数,则选择2个最接近您已知坐标的点,然后选择包含参数范围的点,然后将参数范围/比例更改为插值范围(通常为<0,1>),并作为线性插值进行插值.

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.

关于线性DDA的整数和更多示例在这里:

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

多项式插值

这不是线性的!取所有已知点,从中计算n-th度多项式(通过Lagrange多项式或通过边缘条件或通过回归/曲线拟合或其他方法),并根据参数计算该点作为该多项式的函数.通常,每个轴上有一个多项式,多项式的点或次数越多,结果(振荡)的稳定性就越差.

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

分段多项式插值

它是#1,#2 的组合(n为低以避免振荡).您需要正确调用点序列以管理线段之间的连续性,边缘条件必须考虑上一个和下一个线段...

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 ,...是不是插值的近似曲线(它们不一定穿过控制点).有一种方法可以通过控制点的重新计算在不同类型的曲线之间进行转换.例如,查看此内容:

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:

这篇关于如何产生多点线性插值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆