How many points for spline

Community

H

I wanted to ask if there is an algorithm for choosing the optimal number of control points to create a bezier spline to make it smooth and reduce error. If such an algorithm exists, how fast is the algorithm?

Thank you in advance

Sebastian

+4
source share
3 answers

As a rule, you do not want to work with Bezier curves of a higher order than cubic ones. Evaluation and rendering slows down as the order increases. Cubic curves are also supported by most display libraries, higher orders that you will need to do yourself.

If you are trying to approximate data using Bezier curves, there are a number of approximation algorithms that reduce densely packed data to Bezier curves. If you are looking for a way to draw curves with many points, B-spline curves can be a useful solution. They are easily converted to Bezier curve segments for rendering. See this article for a basic introduction to B-spline curves.

+1
source

I am not sure if I understand your question. Usually you have a fixed number of points, and you calculate the spline that interpolates this number of points.

Wikipedia has an article on spline that can help you.

+2
source

Smoothness has nothing to do with breakpoints. Breakpoints are used only for linear combination with the basic functions of bspline. An arbitrary bspline segment always lies in the convex hull of the corresponding control points. This is the order of the bspline functions you use after.

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

+2
source

Source: https://habr.com/ru/post/1286136/


All Articles