I have the following code to plot value of a bspline curve but it doesn't evaluate when I specify weights and knots and I'm not sure what's going wrong, the weights
and knots
vectors have the correct length (and if I change them I get an error) but for f
I end up with a function that doesn't evaluate.
knots = {0,1,2,3,4,5,6,7,8};
points = {{0,0},{1/2,1},{1,1/4},{3/2,1},{2,0}};
weights = {1,1,1,1,1};
degree= 3;
f = BSplineFunction[points,SplineDegree->degree, SplineKnots->knots,SplineWeights->weights]
g = BSplineFunction[points,SplineDegree->degree]
g[0]
f[0]
Here's a screenshot of my output using Mathematica 10.3 on Windows:
knots={0, 0, 0, 0, 1, 2, 2, 2, 2}
works. I note however the correspondingBSplineCurve
works fine with your knots. $\endgroup$knots = {0, 0, 0, 0, .5, 1, 1, 1, 1};
$\endgroup$BSplineCurve
works without the multiplicity, (and does not hit the end points). $\endgroup$