Slope matching in spline interpolation

88 Views Asked by At

When using a Curve parameterization, I build segment functions as follows:

$X(u) = A_x+B_x \times u+C_x \times u^2+D_x\times u^3$

$Y(u) = A_y+B_y \times u+C_y \times u^2+D_y\times u^3$

$u:[0,1]$

In the solving process, I used the $C^0\ C^1\ C^2$ continuity, but I felt confused about the derivatives. For example, I have three points(1,2),(2,3),(4,2), so I need two parameteric cubic spline. When I want to meet the $C^1$ continuity, following is the process:

$X_1^{'}(u) = B_1x + 2C_1xu + 3D_1xu^2$

$Y_1^{'}(u) = B_1y + 2C_1yu + 3D_1yu^2$

$X_2^{'}(u) = B_2x + 2C_2xu + 3D_2xu^2$

$Y_2^{'}(u) = B_2y + 2C_2yu + 3D_2yu^2$

$X_1^{'}(1) =X_2^{'}(0)$

$Y_1^{'}(1) =Y_2^{'}(0)$

I do not know if the above steps are right?

Do I need to compute $\frac {du}{dx}$ or $\frac{du}{dy} $?