Riemann sum III: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
</html> | </html> | ||
<jsxgraph width="800" height="400" box="box"> | <jsxgraph width="800" height="400" box="box"> | ||
var brd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox:[-8, | var brd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox:[-8,40,8,-5], grid:true}); | ||
var s = brd.create('slider',[[1,30],[5,30],[1,10,50]],{name:'n',snapWidth:1}); | var s = brd.create('slider',[[1,30],[5,30],[1,10,50]],{name:'n',snapWidth:1}); | ||
var a = brd.create('slider',[[1,20],[5,20],[-10,-3,0]],{name:'start'}); | var a = brd.create('slider',[[1,20],[5,20],[-10,-3,0]],{name:'start'}); | ||
Line 23: | Line 23: | ||
], | ], | ||
{fillColor:'#ffff00', fillOpacity:0.3}); | {fillColor:'#ffff00', fillOpacity:0.3}); | ||
/* | |||
brd.createElement('text',[-6,-4,function(){ return 'Sum='+(brd.riemannsum(f,s.Value(),document.getElementById('sumtype').value,a.Value(),b.Value())).toFixed(4); }]); | brd.createElement('text',[-6,-4,function(){ return 'Sum='+(brd.riemannsum(f,s.Value(),document.getElementById('sumtype').value,a.Value(),b.Value())).toFixed(4); }]); | ||
*/ | |||
</jsxgraph> | </jsxgraph> | ||
Line 30: | Line 31: | ||
<source lang="xml"> | <source lang="xml"> | ||
<jsxgraph width="800" height="400" box="box"> | <jsxgraph width="800" height="400" box="box"> | ||
</jsxgraph> | </jsxgraph> | ||
</source> | </source> |
Revision as of 15:22, 2 February 2010
The underlying JavaScript code
<jsxgraph width="800" height="400" box="box">
</jsxgraph>