0

I have a few functions that I have written to calculate a B-spline curve, already given the control points and the desired order. They work fine, however when I input a parameter value of t that is near or equal to 1.0, the points that get plotted all to connect towards the origin.

Unfortunately I cannot provide code, but I can't imagine that this is unexplainable.

I am generating a uniform knot vector, with my first p + 1 knots being 0.0, and the same amount at the end being 1.0. My basis function uses Cox-de-boor recursion, and I am plotting points in the domain 0.0 <= t <= 1.0. The algorithms I am following come from the B-Spline page at https://www.geometrictools.com/Documentation/BSplineCurveLeastSquaresFit.pdf.

Gary Allen
  • 1,218
  • 1
  • 13
  • 28
  • The Cox Deboor formula is not defined at t = 1.0. Try forcing Ni,0(t=1.0) to 1.0 in your codes to see if this solves the problem. – fang Jan 13 '21 at 22:53
  • Oh okay thanks haha! Do you have a source stating that it isn't defined at t=1.0? It definitely makes sense but I don't mind reading up further on it to see common ways of dealing with such a problem – Gary Allen Jan 14 '21 at 06:04
  • The equation (2) in the PDF file you cited says Ni,0(t) is 1 for [t_i, t_i+1) and 0 otherwise. This mean that Ni,0(t=1.0) is 0. So, you have to force it to 1.0. – fang Jan 14 '21 at 08:11

0 Answers0