Difference between revisions of "Slider and function plot"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
(3 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 11: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();
}]);