Inequalities: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
(function() { | (function() { | ||
var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], axis:true}); | var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], axis:true}); | ||
var c = b.create('slider', [[-3,4], [2,4], [-5, | var c = b.create('slider', [[-3,4], [2,4], [-5,1,5]]), | ||
line1 = b.create('line', [function() { return [c.Value(), 0, -1]; }], {strokeColor: 'black'}), | line1 = b.create('line', [function() { return [c.Value(), 0, -1]; }], {strokeColor: 'black'}), | ||
ineq1 = b.create('inequality', [line1], {inverse: true}), | ineq1 = b.create('inequality', [line1], {inverse: true}), | ||
Line 15: | Line 15: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], axis:true}); | var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], axis:true}); | ||
var c = b.create('slider', [[-3,4], [2,4], [-5, | var c = b.create('slider', [[-3,4], [2,4], [-5,1,5]]), | ||
line1 = b.create('line', [function() { return [c.Value(), 0, -1]; }], {strokeColor: 'black'}), | line1 = b.create('line', [function() { return [c.Value(), 0, -1]; }], {strokeColor: 'black'}), | ||
ineq1 = b.create('inequality', [line1], {inverse: true}), | ineq1 = b.create('inequality', [line1], {inverse: true}), |
Revision as of 12:57, 16 December 2014
The JavaScript code
var b = JXG.JSXGraph.initBoard('box1', {boundingbox: [-5, 5, 5, -5], axis:true});
var c = b.create('slider', [[-3,4], [2,4], [-5,1,5]]),
line1 = b.create('line', [function() { return [c.Value(), 0, -1]; }], {strokeColor: 'black'}),
ineq1 = b.create('inequality', [line1], {inverse: true}),
line2 = b.create('line', [1, 2, -1]),
ineq2 = b.create('inequality', [line2], {fillColor: 'yellow'});