Locus computation: Difference between revisions

From JSXGraph Wiki
(New page: <jsxgraph width="600" height="600"> board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 20, 20, -2], axis: true, grid: false, keepaspectratio: true}); p3 = board.createElement(...)
 
No edit summary
Line 1: Line 1:
<jsxgraph width="600" height="600">
<jsxgraph width="600" height="600">
JXG.serverBase = 'http://jsxgraph.uni-bayreuth.de/distrib/server/';
board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 20, 20, -2], axis: true, grid: false, keepaspectratio: true});
board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 20, 20, -2], axis: true, grid: false, keepaspectratio: true});
     p3 = board.createElement('point', [8, 3]);
     p3 = board.createElement('point', [8, 3]);
Line 17: Line 18:
===The underlying JavaScript code===
===The underlying JavaScript code===
<source lang="javascript">
<source lang="javascript">
JXG.serverBase = 'http://jsxgraph.uni-bayreuth.de/distrib/server/';
board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 20, 20, -2], axis: true, grid: false, keepaspectratio: true});
board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 20, 20, -2], axis: true, grid: false, keepaspectratio: true});
p3 = board.createElement('point', [8, 3]);
p3 = board.createElement('point', [8, 3]);

Revision as of 08:42, 8 June 2011

The underlying JavaScript code

JXG.serverBase = 'http://jsxgraph.uni-bayreuth.de/distrib/server/';
board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 20, 20, -2], axis: true, grid: false, keepaspectratio: true});
p3 = board.createElement('point', [8, 3]);
p4 = board.createElement('point', [8, 8]);
c1 = board.createElement('circle', [p4, 4]);
p6 = board.createElement('glider', [0, 0, c1], {name:"D"});
g = board.createElement('line', [p3, p6]);
c2 = board.createElement('circle', [p6, 3]);
tracer = board.createElement('intersection', [c2,g,0], {name: "T"});

loc = board.createElement('locus', [tracer], {strokeColor: 'red', strokeWidth: '1px'});