Closed luiswirth closed 2 years ago
I'm trying to look into it tommorow and I will keep you updated!
Okay so I looked into it and the reason for the bug is that the number of necessary knots (for a closed bspline of degree 3 with 3 elements) is only one, but at least two knots are necessary. This is not yet checked against.
So basically a construction of such a bspline is not allowed as it is not well defined. The formula for a closed bspline (for this crate) is k = e - d + 1
with d = degree, k = #knots, e = #elements.
If you insert another element, the parameters would be fine again and you get a well behaved bspline.
As the Director
(basically the builder but errors are returned immediately) is public, changing the signature of the function is a breaking change.
When running the following code
I get the following (note the
step: inf
)panic at https://github.com/NicolasKlenert/enterpolation/blob/59231f4c0e2e813ff9272d76ed9d4d8f86c1a20b/src/base/list.rs#L438