Difference between revisions of "Sequences of functions"

From JSXGraph Wiki
Jump to navigationJump to search
(New page: <jsxgraph width="600" height="400" box="box"> var brd = JXG.JSXGraph.initBoard('box', {axis:true, originX: 100, originY: 340, unitX: 50, unitY: 200}); var n = brd.createElement('slider',[[...)
 
Line 2: Line 2:
 
var brd = JXG.JSXGraph.initBoard('box', {axis:true, originX: 100, originY: 340, unitX: 50, unitY: 200});
 
var brd = JXG.JSXGraph.initBoard('box', {axis:true, originX: 100, originY: 340, unitX: 50, unitY: 200});
 
var n = brd.createElement('slider',[[1,1.5],[6,1.5],[1,1,70]],{name:'n'});
 
var n = brd.createElement('slider',[[1,1.5],[6,1.5],[1,1,70]],{name:'n'});
var f = function(x){ return Math.pow(x,Math.floor(n.Value()); }
+
var f = function(x){ return Math.pow(x,Math.floor(n.Value())); }
 
var plot = brd.createElement('functiongraph',[f,0,1], {strokeWidth:1,strokeOpacity:0.3});
 
var plot = brd.createElement('functiongraph',[f,0,1], {strokeWidth:1,strokeOpacity:0.3});
  

Revision as of 21:42, 11 June 2009

The underlying JavaScript code