Slider and function plot: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) (Created page with "<jsxgraph width="600" height="600"> var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10], axis:true}); var a = brd.create('slider',[[3,-5],[8,-5],[...") |
A WASSERMANN (talk | contribs) No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<jsxgraph width="600" height="600"> | <jsxgraph width="600" height="600"> | ||
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10], axis:true}) | (function(){ | ||
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10], axis:true}), | |||
a = brd.create('slider',[[2,-5],[7,-5],[-5,1,5]], {name:'a'}), | |||
b = brd.create('slider',[[2,-6],[7,-6],[-5,0,5]], {name:'b'}), | |||
c = brd.create('slider',[[2,-7],[7,-7],[-5,0,5]], {name:'c'}), | |||
f = brd.create('functiongraph',[function(x){ | |||
return a.Value()*x*x + b.Value()*x + c.Value(); | return a.Value()*x*x + b.Value()*x + c.Value(); | ||
}); | }]); | ||
})(); | |||
</jsxgraph> | |||
< | ===The code to produce this page=== | ||
<source lang="javascript"> | |||
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10], axis:true}), | |||
a = brd.create('slider',[[2,-5],[7,-5],[-5,1,5]], {name:'a'}), | |||
b = brd.create('slider',[[2,-6],[7,-6],[-5,0,5]], {name:'b'}), | |||
c = brd.create('slider',[[2,-7],[7,-7],[-5,0,5]], {name:'c'}), | |||
f = brd.create('functiongraph',[function(x){ | |||
return a.Value()*x*x + b.Value()*x + c.Value(); | |||
}]); | |||
</source> | |||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Calculus]] | [[Category:Calculus]] |
Latest revision as of 09:20, 12 January 2015
The code to produce this page
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10], axis:true}),
a = brd.create('slider',[[2,-5],[7,-5],[-5,1,5]], {name:'a'}),
b = brd.create('slider',[[2,-6],[7,-6],[-5,0,5]], {name:'b'}),
c = brd.create('slider',[[2,-7],[7,-7],[-5,0,5]], {name:'c'}),
f = brd.create('functiongraph',[function(x){
return a.Value()*x*x + b.Value()*x + c.Value();
}]);