2
$\begingroup$

I am going to implement a curve editor based on (cubic) B-Spline.

Sometime the user may change a piece of curve's interpolation type, that is, use linear/constant value between two consecutive control points rather than using cubic Bezier interpolation.

Is it possible to make it via modifying knots vector(increase or decrease the multiplicity of a knot)?

I come from a Computer Science background, and have a very hard time reading the theoretical background of the spline. Would you suggest some reading on these topics?

$\endgroup$
1
$\begingroup$

A cubic b-spline is just a string of cubic Bézier curves that are controlled in such a way that smoothness between them is preserved.

Any string of Bézier curves can be represented as a b-spline. If one of the Bézier curves happens to be linear in shape, that's perfectly OK.

Suppose you have two control points $P$ and $Q$. If you use triple knots at both ends of the segment, and you place b-spline control points at $P$, $\tfrac23 P + \tfrac13 Q$, $\tfrac13 P + \tfrac23 Q$, and $Q$, then you'll get a linear segment. But the triple knots will allow corners at $P$ and $Q$ where this linear segment joins the adjacent ones. If you don't want to allow such corners, use double knots, instead. This will cause the linear segment to join the adjacent ones in a $C_1$ fashion (continuous first derivatives). You can get linear segments using single knots, too, and these will then join the adjacent segments in a $C_2$ fashion.

I'd recommend reading chapter 6 of this document, or at least stare long and hard at the pictures.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.