我怎样才能产生多点线性插值? [英] How can i produce multi point linear interpolation?

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

问题描述

我有一个线性插值方法.这是在 (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 次多项式(通过拉格朗日多项式或边缘条件或回归/曲线拟合或其他任何方式),并根据该多项式的函数计算参数中的点.通常每个轴有一个多项式,多项式的点数或次数越多,结果(振荡)就越不稳定.

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

[注释]

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天全站免登陆