0
$\begingroup$

I am trying to use B spline curve fitting. The order of B-spline curve is 4. When I have many control points, it works well. However if the number of control points is small such as two, my program will crash. I realize that the number of control points is related to number of knots and the order.

Can anyone help me clarify the relationship or give some links on it?

$\endgroup$

1 Answer 1

3
$\begingroup$

The formula is:

$m = n + p + 1$

  • $m$ number of knots.
  • $n$ number of control points.
  • $p$ degree.

You can check the nurbs book chapter 2 for a complete set of definitions. The Shumaker's book is a more readable reference.

There is a paragraph on interpolation also on Tom Lyche and Knut Mørgens's lecture notes. Here you shall find that all the entries in your matrix are positive, so the linear algebra should be ok. Donno what about the rest of your code.

$\endgroup$
4
  • $\begingroup$ I am reading the NURBS book. From the link,it gives the same formula:cs.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/…. I hope to know the process that gets the formula. $\endgroup$ Commented Oct 21, 2014 at 8:41
  • $\begingroup$ It derives from the definition of B-Spline. If you want to proof it you shall probably use the definition and "count", but I never did that. Did you check Tom Lyche's notes? There is a paragraph on interpolation that might help you. $\endgroup$ Commented Oct 21, 2014 at 8:48
  • $\begingroup$ From the link:cs.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/… It says "Since each control point needs a basis function and the number of basis functions satisfies m = n + p + 1. ". From the definition of the B-spline curve, it is weighted average of input points. The number of the number of basis functions should equal the number of input points. $\endgroup$ Commented Oct 22, 2014 at 8:53
  • $\begingroup$ The definition I am referring to, is in paragraph 2.2 of the nurbs book, equation 2.5. When I say "count" it means that you need to find a smart way to recover the formula $m=n+p+1$ from the recursive definition in the book. The web page you are pointing at misses this definition, which is the most important in this case. $\endgroup$ Commented Oct 22, 2014 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.