views:

269

answers:

3

H community,

I wanted to ask if there is an algorithm for choosing the optimal amount of support points for creating a bezier spline in order to make it look smooth and reduce the error. If there is such an algorithm how fast is the algorithm?

Thanks in advance

Sebastian

+1  A: 

I am not sure if I am understanding your question. Normally you have a fixed amount of points and you calculate the spline which interpolates that amount of points.

There is an article at the wikipedia about spline which might help you.

Luixv
true, your answer is correct. You should increase the order of the spline. I've assumed that the spline was the natural cubic one.
Luixv
+1  A: 

The smoothness doesn't have anything to do with the control points. The control points are only used for linear combination with the bspline basis functions. An arbitrary bspline segment always lies in the convex hull of the corresponding control points. It's the order of the bspline basis functions you are after.

So if you want smoothness, you should increase the order of the basis functions. Linear bsplines will only give linear segments.

Magnus Skog
+1  A: 

Generally you don't want to work with Bezier curves of higher order than cubic. The evaluation and rendering gets slower as the order goes up. Cubic curves are also supported by most display libraries, higher orders you'll need to render yourself.

If you're trying to approximate data with Bezier curves, there's a whole host of approximation algorithms that reduce densely packed data to Bezier curves. If you're looking for a way to draw curves with many points, B-Splines curves may be a useful solution. These are easily converted to Bezier curve segments for rendering. See this paper for a basic introduction to B-spline curves.

J. Peterson