Hyperbola III: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
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});


const sqrt5 = Math.sqrt(5);
const sq5 = Math.sqrt(5);


var f1 = board.create('glider', [-sqrt5, 0, board.defaultAxes.x], {name:"f'"});
var f1 = board.create('point', [-sq5, 0, {name:"f'"});
var f2 = board.create('glider', [sqrt5, 0, board.defaultAxes.x], {name:"f"});
var f2 = board.create('point', [ sq5, 0, {name:"f"});
var hyp = board.create('hyperbola', [f1, f2, [4,Math.sqrt(3)]]);
var p = board.create('point', [ 4, \math.sqrt(3), {name:"p"});
var hyp = board.create('hyperbola', [f1, f2, p]);





Revision as of 07:14, 6 July 2021

The underlying JavaScript code