PixelDuck

04-04-2005, 07:16 AM

Hi,

I might sound stupid here, but could someone please explain evaluation of a b-spline for me? First off, when doing interpolation through corner points you have to duplicate 'k' of the first and final knot vector elements (k being the degree + 1). If we now evaluate using the vector elements as duplicates we get a division by zero, which is clearly not mathematically correct...

The division comes from this:

vec = { 0, 0, 1, 2, 3, 3 };

B1(u) = ( (u - vec[0])/(vec[i+1] - vec[i]) );

...because vec[i+1] and vec[i] are equal when i == 0.

This example is only for linear b-splines (but the same applies for any degree).

Is there something I'm doing wrong? Please explain to me the whole process of evaluation... How to avoid the situation where there would be a division by zero?

- PD

I might sound stupid here, but could someone please explain evaluation of a b-spline for me? First off, when doing interpolation through corner points you have to duplicate 'k' of the first and final knot vector elements (k being the degree + 1). If we now evaluate using the vector elements as duplicates we get a division by zero, which is clearly not mathematically correct...

The division comes from this:

vec = { 0, 0, 1, 2, 3, 3 };

B1(u) = ( (u - vec[0])/(vec[i+1] - vec[i]) );

...because vec[i+1] and vec[i] are equal when i == 0.

This example is only for linear b-splines (but the same applies for any degree).

Is there something I'm doing wrong? Please explain to me the whole process of evaluation... How to avoid the situation where there would be a division by zero?

- PD