_make_periodic_spline(x, y, t, k, axis)
The original system is formed by n + k - 1
equations where the first k - 1
of them stand for the k - 1
derivatives continuity on the edges while the other equations correspond to an interpolating case (matching all the input points). Due to a special form of knot vector, it can be proved that in the original system the first and last k
coefficients of a spline function are the same, respectively. It follows from the fact that all k - 1
derivatives are equal term by term at ends and that the matrix of the original system of linear equations is non-degenerate. So, we can reduce the number of equations to n - 1
(first k - 1
equations could be reduced). Another trick of this implementation is cyclic shift of values of B-splines due to equality of k
unknown coefficients. With this we can receive matrix of the system with upper right and lower left blocks, and k
diagonals. It allows to use Woodbury formula to optimize the computations.
Abscissas.
Ordinates.
B-spline degree.
Knots taken on a circle, k
on the left and k
on the right of the vector x
.
Compute the (coefficients of) interpolating B-spline with periodic boundary conditions.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them