Cubic spline interpolation: Difference between revisions
From JSXGraph Wiki
| A WASSERMANN (talk | contribs) No edit summary | A WASSERMANN (talk | contribs) No edit summary | ||
| Line 29: | Line 29: | ||
|            } |            } | ||
|            var F = JXG.Math.Numerics.splineDef(x, y); |            var F = JXG.Math.Numerics.splineDef(x, y); | ||
|           /* | |||
|            var px = []; |            var px = []; | ||
|            i = 0; |            i = 0; | ||
| Line 37: | Line 38: | ||
|            } |            } | ||
|            var py = JXG.Math.Numerics.splineEval(px, x, y, F); |            var py = JXG.Math.Numerics.splineEval(px, x, y, F); | ||
|            return F; |           */ | ||
|            return F; // ????? | |||
|           return [px,py]; // ????? | |||
|          }             |          }             | ||
Revision as of 17:57, 3 December 2008
Under Construction -- NOT YET WORKING
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();
        }
