Interpolation: Neville's algorithm

From JSXGraph Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

References

The underlying JavaScript code

board = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox: [-5, 5, 7, -3]});
board.suspendUpdate();
var p = [];
p[0] = board.create('point', [-1,2], {size:4});
p[1] = board.create('point', [3,-1], {size:4});
p[2] = board.create('point', [2,1], {size:4});

var graph = board.create('curve', JXG.Math.Numerics.Neville(p),{strokeWidth:5,strokeOpacity:0.5});
g = board.create('glider', [graph]);
t = board.create('tangent', [g],{dash:1,strokeColor:'green'});
board.unsuspendUpdate();
      
function addPoint() {
    p.push(board.create('point',[(Math.random()-0.5)*10,(Math.random()-0.5)*3],{size:4}));
    board.update();
}