Suppose i have n
points, also suppose that this points have an order, and not necessary this points make a function. I'm wondering how to interpolate them if the points do not describe a function? For example this will be the original points:
我希望这个结果:
请注意,仅使用样条曲线不起作用,因为这些点不构成函数,并且使用贝塞尔曲线也不起作用,因为它们不会对点进行插值(仅通过它们附近)。我该怎么做才能得到这个?有算法吗?
只是一个更新。由于我作为参考的已接受答案的链接已关闭,因此我将分享我在此基础上撰写的一篇文章,以帮助其他人解决此问题。
在 WPF 中使用贝塞尔曲线插值 2D 点 https://www.codeproject.com/Articles/769055/Interpolate-D-points-usign-Bezier-curves-in-WPF
最终算法的实时实现。 JavaScript https://rulyotano.com/demos/bezier
-
样条线有很多种,例如,Catmull-Rom 样条 http://cubic.org/docs/hermite.htm都适用于此。
-
简单又有趣的方法通过贝塞尔曲线插值 https://agg.sourceforge.net/antigrain.com/research/bezier_interpolation/index.html#PAGE_BEZIER_INTERPOLATION马克西姆·谢马纳列夫 (Maxim Shemanarev) 提出
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)