NURBS-Python icon indicating copy to clipboard operation
NURBS-Python copied to clipboard

Is it possible to get the b-spline value at the end point

Open TomMelt opened this issue 3 years ago • 0 comments

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.

image

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.

TomMelt avatar Jan 15 '21 17:01 TomMelt