another mental refactor of how I conceptualize splines might be on its way
I used to insist that the knot vector should be separate from control points, but, it actually makes sense to associate knots with control points
I used to insist that the knot vector should be separate from control points, but, it actually makes sense to associate knots with control points
this came after I had to think about what knot value to delete when deleting a control point
clearly, there is a link between a control point and a knot value, and so that association should maybe reside in the data structure itself
clearly, there is a link between a control point and a knot value, and so that association should maybe reside in the data structure itself
there's valuable simplicity in having a clean association between the number of curves, knots, control points, and control points per curve, that doesn't require managing a separate knot vector
so for example, a non-uniform cubic bézier spline with one curve, has 4 control points, but its two knot values are only associated with the endpoints
so maybe, it makes more sense to conceptualize it as two control points, that have both a position and an offset vector
so maybe, it makes more sense to conceptualize it as two control points, that have both a position and an offset vector
after all - it doesn't make sense to delete a bézier tangent point, the only ones you should be able to delete are control points that are associated with a knot value
so maybe we should just, redefine control points, and associate a knot value with each?
so maybe we should just, redefine control points, and associate a knot value with each?
the one downside is that some spline types rely on a knot vector that goes outside of the curve interval itself, like the B-spline. but I think it's okay to make that a special case, to have the extended knot vector live as a separate entity from the internal knots
I'm thinking the association will be like,
the knot value of a control point C, is the knot value at the start of the curve whose local spline segment has C as its first control point
..although I think that will throw catmull-rom splines into a gross off-by-one hell, hmm
the knot value of a control point C, is the knot value at the start of the curve whose local spline segment has C as its first control point
..although I think that will throw catmull-rom splines into a gross off-by-one hell, hmm
Loading suggestions...