点序列插值 [英] Point Sequence Interpolation

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

问题描述

给定空间中的任意点序列,你将如何在它们之间产生一个平滑的连续插值?\\ b

欢迎2D和3D解决方案。我们也赞赏以任意粒度生成点列表的解决方案以及为贝塞尔曲线生成控制点的解决方案。另外,看到一个迭代解决方案会很酷可以近似接近曲线的早期部分,因此您可以绘制它。 Catmull-Rom spline 保证通过所有控制点。我发现这比调整其他类型样条的中间控制点更方便。



这个 PDF by Christopher Twigg 对样条数学有一个很好的简要介绍。最好的摘要语句是:


Catmull-Rom样条函数具有C1
连续性,局部控制和
插值,但不要在
的控制
点的凸包中。

换句话说,如果点表示向右急转弯,样条线在向右转弯之前会左转(在该文档中有一个示例图片)。在这种情况下,在示例矩阵中使用他的tau参数来控制这些转弯的紧密程度。



这里是另一个例子与一些可下载的DirectX代码。

Given an arbitrary sequence of points in space, how would you produce a smooth continuous interpolation between them?

2D and 3D solutions are welcome. Solutions that produce a list of points at arbitrary granularity and solutions that produce control points for bezier curves are also appreciated.

Also, it would be cool to see an iterative solution that could approximate early sections of the curve as it received the points, so you could draw with it.

解决方案

The Catmull-Rom spline is guaranteed to pass through all the control points. I find this to be handier than trying to adjust intermediate control points for other types of splines.

This PDF by Christopher Twigg has a nice brief introduction to the mathematics of the spline. The best summary sentence is:

Catmull-Rom splines have C1 continuity, local control, and interpolation, but do not lie within the convex hull of their control points.

Said another way, if the points indicate a sharp bend to the right, the spline will bank left before turning to the right (there's an example picture in that document). The tightness of those turns in controllable, in this case using his tau parameter in the example matrix.

Here is another example with some downloadable DirectX code.

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

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