控制点的数量总是比拟合点的数量多 2 个吗?
我想知道控制点的数量是否总是比拟合点的数量多 2 个。 专门用于三次样条。
I am wondering if the number of control points will always be 2 more than the number of fit points.
Specially for cubic spline.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您的问题,我猜您要么是在问自然三次样条曲线 ,或贝塞尔样条线由三次贝塞尔曲线制成。对于自然三次样条曲线,控制点的数量与拟合点的数量完全相同。
然而,我很确定你实际上在谈论贝塞尔样条线。这里有点棘手。如果您只想要一条三次贝塞尔曲线,那么您需要 2 个拟合点(端点)以及另外两个控制点,这是正确的。但是,如果我们添加第二条贝塞尔曲线来形成贝塞尔样条线,我们还需要一个拟合点和另外两个控制点。总共 7 个控制点,其中 3 个是拟合点。添加第三条曲线会产生 10 个控制点,其中 4 个是拟合点。如果我们继续这样添加曲线,我们可以看到控制点的数量实际上是
3*n-2
,其中n
是拟合点的数量。Based on your question, I would guess that you're either asking about natural cubic spline curves, or Bezier spline made from cubic Bezier curves. In the case of natural cubic spline curves, the number of control points is exactly the same as the number of fit points.
However, I'm pretty sure you're actually talking about Bezier splines. It's a little trickier here. If you just want a single cubic Bezier curve, then you are correct that 2 fit points (the end points) are needed, as well as two more control points. But if we add a second Bezier curve to form a Bezier spline, we need one more fit point plus another two control points. That's a total of 7 control points, 3 of which are fit points. Adding a third curve gives 10 control points, of which 4 are fit points. If we continue adding curves like this, we can see that the number of control points is actually
3*n-2
, wheren
is the number of fit points.