Hyperbola III: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 12: Line 12:
var f2 = board.create('point', [0, sq5], {name:"f"});
var f2 = board.create('point', [0, sq5], {name:"f"});
var p  = board.create('point', [2, Math.sqrt(2)], {name:"p"}); //-0.9428
var p  = board.create('point', [2, Math.sqrt(2)], {name:"p"}); //-0.9428
var o = board.create('point', [0, 0], {withLabel:false, color: 'blue', size:1});
var o = board.create('point', [0, 0], {withLabel:false, color: 'blue'});
var e1 = board.create('point', [1, 0], {withLabel:false, color: 'blue', size:1});
var e1 = board.create('point', [1, 0], {withLabel:false, color: 'blue'});
var e2 = board.create('point', [0, 1], {withLabel:false, color: 'blue', size:1});
var e2 = board.create('point', [0, 1], {withLabel:false, color: 'blue'});


var phi = board.create('transform', [-Math.PI * 0.25], {type: 'rotate'});
var phi = board.create('transform', [-Math.PI * 0.25], {type: 'rotate'});
Line 24: Line 24:
var hyp = board.create('hyperbola', [f1, f2, p]);
var hyp = board.create('hyperbola', [f1, f2, p]);


var ax_z1 = board.create('line', [[-2, 1], [-1, 2]], {lastArrow: true, strokeColor:'black'});
var ax_z1 = board.create('line', [o, e1], {lastArrow: true, strokeColor:'black'});
var ax_z2 = board.create('line', [[-2, 1], [-3, 2]], {firstArrow: true, strokeColor:'black'});
var ax_z2 = board.create('line', [o, e2], {firstArrow: true, strokeColor:'black'});
board.update();
board.update();



Revision as of 15:04, 6 July 2021

The underlying JavaScript code