How to insert a knot in NURBS if it coincides with the first knot?

119 Views Asked by At

I want to insert a knot to the knot vector. Currently I use the algorithm from the NURBS book, but it has an assumption that U={0,...0,u_{k},u_{k+1}...,1,...1}, the first knot and the last knot repeat k+1 times (k is the degree of the NURBS curve). If I'm given a knot vector such as {0,0.1,0.2,...,1} and I want to insert a new knot with value "0", the algorithm would fail. How can I change the algorithm to handle this problem?

1

There are 1 best solutions below

0
On

For a given knot vector knots[], the valid range for the defined B-spline curve is from knots[degree] to knots[num_poles] (note: the array starts with index 0). So, for a knot vector like [0, 0.1, 0.2, 0.3, ....1], 0 is never in the valid range at all. So, you probably should not insert knot at 0.0.