Hyperbola: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
var board = JXG.JSXGraph.initBoard('jxgbox', { boundingbox: [-5, 5, 5, -5], axis: true, showClearTraces: true}); | var board = JXG.JSXGraph.initBoard('jxgbox', { boundingbox: [-5, 5, 5, -5], axis: true, showClearTraces: true}); | ||
var h = board.create('hyperbola', [[- | var h = board.create('hyperbola', [[-Math.sqrt(2),0], [Math.sqrt(2),0], [2, Math.sqrt(3)]]); | ||
var l1 = board.create('line', [0, 1, 1], {dash: 1}); | var l1 = board.create('line', [0, 1, 1], {dash: 1}); | ||
var l2 = board.create('line', [0, -1, 1], {dash: 1}); | var l2 = board.create('line', [0, -1, 1], {dash: 1}); | ||
Line 13: | Line 13: | ||
=== The underlying JavaScript code === | === The underlying JavaScript code === | ||
<source lang="javascript"> | <source lang="javascript"> | ||
JXG.Options.label.autoPosition = true; | JXG.Options.label.autoPosition = true; | ||
JXG.Options.text.fontSize = 16; | JXG.Options.text.fontSize = 16; | ||
Line 20: | Line 19: | ||
var board = JXG.JSXGraph.initBoard('jxgbox', { boundingbox: [-5, 5, 5, -5], axis: true, showClearTraces: true}); | var board = JXG.JSXGraph.initBoard('jxgbox', { boundingbox: [-5, 5, 5, -5], axis: true, showClearTraces: true}); | ||
var h = board.create('hyperbola', [[- | var h = board.create('hyperbola', [[-Math.sqrt(2),0], [Math.sqrt(2),0], [2, Math.sqrt(3)]]); | ||
var l1 = board.create('line', [0, 1, 1], {dash: 1}); | var l1 = board.create('line', [0, 1, 1], {dash: 1}); | ||
var l2 = board.create('line', [0, -1, 1], {dash: 1}); | var l2 = board.create('line', [0, -1, 1], {dash: 1}); |
Latest revision as of 19:31, 27 June 2021
The underlying JavaScript code
JXG.Options.label.autoPosition = true;
JXG.Options.text.fontSize = 16;
JXG.Options.line.strokeWidth = 0.8;
var board = JXG.JSXGraph.initBoard('jxgbox', { boundingbox: [-5, 5, 5, -5], axis: true, showClearTraces: true});
var h = board.create('hyperbola', [[-Math.sqrt(2),0], [Math.sqrt(2),0], [2, Math.sqrt(3)]]);
var l1 = board.create('line', [0, 1, 1], {dash: 1});
var l2 = board.create('line', [0, -1, 1], {dash: 1});