(Follow-up of this question.)
Given a sequence of cubic Bézier curves, how can I modify them minimally to make them join in a C2-continuous way?
Input:
- curve P with control points
P0
,P1
,P2
,P3
- curve Q with control points
Q0
,Q1
,Q2
,Q3
- if it helps, you can assume that they are already C1 continuous.
Constraints:
- C0 continuity:
P3 = Q0
- C1 continuity:
P2 - P3 = Q0 - Q1
- C2 continuity:
P1 - 2*P2 + P3 = Q0 - 2*Q1 + Q2
- modified curves as close as possible to original curves P and Q