-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Number of spline basis functions #27
Comments
It seems the constructor If you would like to have four B-spline functions with knots (0,1) and polynomial degree 1, the following script seems working fine here. julia> basis = BSplineBasis(2, [0,0,1,1])
4-element BSplineBasis{Vector{Int64}}:
order: 2
breakpoints: [0, 0, 1, 1]
julia> length(basis)
4 Btw, I'm also working on another B-spline package, named BasicBSpline.jl. With this package, you can solve this issue like this: julia> using BasicBSpline
julia> k = KnotVector(0,1)*3
KnotVector([0.0, 0.0, 0.0, 1.0, 1.0, 1.0])
julia> P = BSplineSpace{1}(k) # polynomial degree 1
BSplineSpace{1, Float64}(KnotVector([0.0, 0.0, 0.0, 1.0, 1.0, 1.0]))
julia> dim(P)
4 |
Thanks @hyrodium ! It makes sense that the constructor extends the knots based on the order. |
Hi
Thank you for this package. I consider using it in another package, but there is a thing I don't understand -- from simple examples I expect to have fewer functions.
Consider the knot vector
Here,
length(basis)
returns 5 as expected and plotting the function look right. But when increasing the order I run into troubleHere,
length(basis)
returns 6, but I expect 4. Consider the output ofplot(basis)
I would index the functions from 0 through 3. I expect the 0th and 3rd functions to be constantly 0. The 1st and 2nd should be the two straight lines.
What are the rest?
This becomes a problem when constructing a
Spline
because it insists on having a largercoeffs
vector than the number of basis functions I anticipate.The text was updated successfully, but these errors were encountered: