Question

I am wondering if the number of control points will always be 2 more than the number of fit points. Specially for cubic spline.

Was it helpful?

Solution

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, where n is the number of fit points.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top