Sequences of functions

From JSXGraph Wiki
Revision as of 16:14, 27 May 2010 by A WASSERMANN (talk | contribs)


The underlying JavaScript code

<jsxgraph width="600" height="400" box="box">
var brd = JXG.JSXGraph.initBoard('box', {axis:true,  boundingbox:[-0.25,1.7,1.25,-0.5]});
var n = brd.create('slider',[[0.1,1.5],[0.9,1.5],[1,1,100]],{name:'n',snapWidth:1});
var f = function(x){ return Math.pow(x,n.Value()); }
var plot = brd.create('functiongraph',[f,0,1], {strokeWidth:2});
brd.createElement('text',[0.2,0.7,function(){return 'f(x)=x<sup>'+Math.floor(n.Value())+'</sup>';}],
  {fontSize:'20px'});
</jsxgraph>