Cubic spline interpolation: Difference between revisions
From JSXGraph Wiki
| A WASSERMANN (talk | contribs) No edit summary | A WASSERMANN (talk | contribs) No edit summary | ||
| Line 16: | Line 16: | ||
|          p[0] = board.createElement('point', [-1,2], {style:6}); |          p[0] = board.createElement('point', [-1,2], {style:6}); | ||
|          p[1] = board.createElement('point', [3,-1], {style:6}); |          p[1] = board.createElement('point', [3,-1], {style:6}); | ||
|         p[2] = board.createElement('point', [5,0], {style:6}); | |||
|          function computeSpline() { |          function computeSpline() { | ||
Revision as of 17:48, 3 December 2008
Constructs a cubic spline through given points. Points can be added by clicking on "Add point".
        function addPoint() {
          p.push(board.createElement('point',[(Math.random()-0.5)*10,(Math.random()-0.5)*3],{style:6}));
          board.update();
        }
