Share JSXGraph: example "Catmull-Rom splines"

JSXGraph
Share JSXGraph: example "Catmull-Rom splines"
This website is a beta version. The official release will be in **2023**.

Catmull-Rom splines

Have also a look at "Cubic spline interpolation".
// Define the id of your board in BOARDID

const board = JXG.JSXGraph.initBoard(BOARDID, {
    axis: true,
    boundingbox: [-5, 5, 5, -5]
});
var p = [],
    c, i;

// Create 5 random points
for (i = 0; i < 5; i++) {
    p.push(board.create('point', [(Math.random() - 0.5) * 7, (Math.random() - 0.5) * 7]));
}
c = board.create('curve', JXG.Math.Numerics.CatmullRomSpline(p), {
    strokeWidth: 3
});