NURBS-Python
NURBS-Python copied to clipboard
Is it possible to get the b-spline value at the end point
Hi,
I am using the function basis_function_ders_one
to generate B-spline basis functions for my project.
I notice that they are defined between the knots ti <= x < ti+k
They include the first knot but they are less than the last. This is my issue. Is it possible to get the value at the rightmost knot.
This is important for me because I need to know the value of the non-zero b-spline (and the first derivative) which sit on the last knot of my grid.
For example, if I have knots = [0,0,0,1,2,3,4,5,5,5] with degree k = 2 The last b-spline N_6,2(x) is non-zero exactly on the knot t7 = 5. However if I use the code:
basis(degree=2, knot_vector=knots, span=6, knot=5., order=1)
Then I will get zero. You can see in the plot below that exactly at the final knot the value drops to zero.
Also if it's possible to switch the functions to use ti < x <= ti+k (right-sided grid) this will also work as I do not need the values on the left most side.
Appreciate the help.