Limacon: Difference between revisions
From JSXGraph Wiki
No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 7: | Line 7: | ||
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 16, 18, -2]}); | var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 16, 18, -2]}); | ||
var p3 = board. | var p3 = board.create('point', [8, 4], {face:'x',size:3,name:"P_{3}",fixed:true}); | ||
var p4 = board. | var p4 = board.create('point', [8, 8], {size:4,face:'x',name:"P_{4}",fixed:true}); | ||
var c1 = board. | var c1 = board.create('circle', [p4, p3]); | ||
var p6 = board. | var p6 = board.create('glider', [0, 0, c1], {face:'o',size:1,name:"P_{6}"}); | ||
var g = board.create('line', [p3, p6]); | var g = board.create('line', [p3, p6]); | ||
var c2 = board.create('circle', [p6, 3]); | var c2 = board.create('circle', [p6, 3]); | ||
var p14_1 = board.create(' | var p14_1 = board.create('intersection', [c2,g,0], {size:3,face:'[]',name:"M",trace:true}); | ||
var p14_2 = board.create(' | var p14_2 = board.create('intersection', [c2,g,1], {size:3,face:'[]',name:"N",trace:true}); | ||
function clearTrace() { | function clearTrace() { | ||
Line 23: | Line 23: | ||
p14_2.clearTrace(); | p14_2.clearTrace(); | ||
} | } | ||
clearTrace(); | |||
</jsxgraph> | </jsxgraph> | ||
Line 34: | Line 35: | ||
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 16, 18, -2]}); | var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 16, 18, -2]}); | ||
var p3 = board. | var p3 = board.create('point', [8, 4], {face:'x',size:3,name:"P_{3}",fixed:true}); | ||
var p4 = board. | var p4 = board.create('point', [8, 8], {size:4,face:'x',name:"P_{4}",fixed:true}); | ||
var c1 = board. | var c1 = board.create('circle', [p4, p3]); | ||
var p6 = board. | var p6 = board.create('glider', [0, 0, c1], {face:'o',size:1,name:"P_{6}"}); | ||
var g = board.create('line', [p3, p6]); | var g = board.create('line', [p3, p6]); | ||
var c2 = board.create('circle', [p6, 3]); | var c2 = board.create('circle', [p6, 3]); | ||
var p14_1 = board.create(' | var p14_1 = board.create('intersection', [c2,g,0], {size:3,face:'[]',name:"M",trace:true}); | ||
var p14_2 = board.create(' | var p14_2 = board.create('intersection', [c2,g,1], {size:3,face:'[]',name:"N",trace:true}); | ||
function clearTrace() { | function clearTrace() { |
Latest revision as of 13:04, 3 March 2021
With JSXGraph elements can be traced to visualize construced loci.
References
The underlying JavaScript code
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-2, 16, 18, -2]});
var p3 = board.create('point', [8, 4], {face:'x',size:3,name:"P_{3}",fixed:true});
var p4 = board.create('point', [8, 8], {size:4,face:'x',name:"P_{4}",fixed:true});
var c1 = board.create('circle', [p4, p3]);
var p6 = board.create('glider', [0, 0, c1], {face:'o',size:1,name:"P_{6}"});
var g = board.create('line', [p3, p6]);
var c2 = board.create('circle', [p6, 3]);
var p14_1 = board.create('intersection', [c2,g,0], {size:3,face:'[]',name:"M",trace:true});
var p14_2 = board.create('intersection', [c2,g,1], {size:3,face:'[]',name:"N",trace:true});
function clearTrace() {
p14_1.clearTrace();
p14_2.clearTrace();
}