Recently, I was reading about a "Natural Piecewise Hermite Spline" in Game Programming Gems 5 (under the Spline-Based Time Control for Animation). This particular spline is used for generating a C2 Hermite spline to fit some given data. I kinda understand how natural cubic spline interpolation works (ie: setup a tridiagonal matrix, solve Ax=b where x is the vector of 2nd derivatives). However, I don't quite understand how this book calculates the slopes for a spline.
Here's what their system of equations looks like: $$ \begin{multline} \begin{bmatrix} 2 & 1 & 0 &\ldots & 0\\ \Delta t_0 & 2(\Delta t_0 + \Delta t_1) & \Delta t_1 & \ldots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots\\ 0 & \ldots & \Delta t_{n-2} & 2(\Delta t_{n-2} + \Delta t_{n-1}) & \Delta t_{n-1} \\ 0 & \ldots & 0 & 1 & 2 \end{bmatrix} \begin{bmatrix} y{\prime}_0 \\ y{\prime}_1\\ \vdots\\ y{\prime}_{n-1}\\ y{\prime}_n \end{bmatrix} = \\ \begin{bmatrix} \frac{3}{\Delta t_0}(y_1-y_0)\\ \frac{3}{\Delta t_0 \Delta t_1}[\Delta t_0^{2} (y_2-y_1) + \Delta t_1^{2} (y_1-y_0)] \\ \vdots \\ \frac{3}{\Delta t_{n-2} \Delta t_{n-1}}[\Delta t_{n-2}^{2} (y_n-y_{n-1}) + \Delta t_{n-1}^{2} (y_{n-1}-y_{n-2})] \\ \frac{3}{\Delta t_{n-1}}(y_n-y_{n-1}) \end{bmatrix} \end{multline} $$
given data input $(x_i,y_i)$ where $ \Delta t_i = x_{i+1}-x_i$.
What confuses me is that normally the unknown is a set of 2nd derivatives, but here, they're solving for the first derivatives. The tridiagonal that I've normally seen for natural splines also has the first row equal to $\begin{bmatrix} 1, & 0, & \ldots \end{bmatrix}$ and the last equal to $\begin{bmatrix} 0, & \ldots, & 1\end{bmatrix}$.
Does anyone understand how this equation might've been derived? Additionally, is there much advantage to using a natural piecewise Hermite with C2 continuity over just a cubic spline? I could find next to nothing online piecewise Hermite curves with C2.
Thanks.
PS: I'm not a math guru, so apologies if my wording or equations seem off.