Restrict points to limited area: 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:[-5,5,5,-5], axis:true}); var A = brd.create('glider', [-1,-1], {name:'A'}); var B = b...") |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<jsxgraph width="600" height="600"> | <jsxgraph width="600" height="600"> | ||
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,5,5,-5], axis:true}); | var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,5,5,-5], axis:true}); | ||
var A = brd.create(' | var A = brd.create('point', [-1,-1], {name:'A'}); | ||
var B = brd.create(' | var B = brd.create('point', [-3, 2], {name:'B'}); | ||
var C = brd.create(' | var C = brd.create('point', [ 3, 0], {name:'C'}); | ||
brd.on('update', function() { | brd.on('update', function() { |
Revision as of 09:42, 18 June 2013
The underlying JavaScript code
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,5,5,-5], axis:true});
var P0 = brd.create('point', [-4,-1], {name:'', face:'[]'});
var P1 = brd.create('point', [4,-1], {name:'', face:'[]'});
var li = brd.create('line', [P0,P1]);
var A = brd.create('glider', [0,-1,li], {name:'A'});
var B = brd.create('glider', [-3,-1,li], {name:'B'});
var C = brd.create('glider', [ 3,-1,li], {name:'C'});
brd.on('update', function() {
var list = [A, B, C], i;
for (i=
});