I was not sure whether this is a computer science question or a math question, so I posted it here, hope that it is alright.
I am trying to learn the technique of Hermite interpolation. I do understand that it is a generalization of Newton polynomial interpolation, which also considers derivatives to ensure continuity of the interpolated curve at the provided points.
In the book Computer Animation — Algorithms and Techniques by Rick Parent, there is a definition of Hermite interpolation that looks like this:
Hermite interpolation generates a cubic polynomial from one point to another. In addition to specifying the beginning and ending points $(P_i,P_{i+1})$, the user needs to supply beginning and ending tangent vectors $(P'_i,P'_{i+1})$ as well.
Here, just the first derivatives are considered, and the aim is to find a polynomial of degree 3 by finding appropriate coefficients $a_3,a_2,a_1,a_0$ such that we have $a_3x^3 + a_2x^2 + a_1x + a_0$. These are found by solving a system of linear equations. So far, so good.
Now, in the book, the matrices look like this:
The general matrix form for a curve is $P(u) = U^TMB$. In the case of Hermite interpolation, $$ U^T = \begin{bmatrix} u^3 & u^2 & u & 1 \end{bmatrix} \\ M = \begin{bmatrix} 2 & -2 & 1 & 1 \\ -3 & 3 & -2 & -1 \\ 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix} \\ B = \begin{bmatrix} P_i \\ P_{i+1} \\ P'_i \\ P'_{i+1} \end{bmatrix} $$
I do not understand the matrix $M$, I do not see where the values are coming from. Are these fixed, or can I somehow compute them?