Pappus's hexagon theorem

From JSXGraph Wiki
Revision as of 21:58, 2 May 2021 by A WASSERMANN (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The underlying JavaScript code

JXG.Options.label.autoPosition = true;
JXG.Options.text.fontSize = 24;

var board = JXG.JSXGraph.initBoard("jxgbox", {boundingbox: [-5,5,5,-5], showCopyright:false, showNavigation:false});

var q = board.create('point', [-4, -2], {name:'q'});
var q1 = board.create('point', [-1.5, -2], {name:'', color: 'blue'});
var q2 = board.create('point', [-1.5, -1], {name:'', color: 'blue'});
var l1 = board.create('line', [q, q1], {straightFirst: false});
var l2 = board.create('line', [q, q2], {straightFirst: false});

var p1 = board.create('glider', [-1, -2, l1], {name:'p_1'});
var p3 = board.create('glider', [3, -2, l1], {name:'p_3'});

var p3s = board.create('glider', [-1.5, 1, l2], {name:"p_3'"});
var p2s = board.create('glider', [0, 1, l2], {name:"p_2'"});

var s3 = board.create('segment', [p1, p3s], {color: 'black'});
var s2 = board.create('segment', [p1, p2s], {color: 'black'});

var par1 = board.create('parallel', [s3, p3], {visible: false});
var p1s = board.create('intersection', [par1, l2], {name:"p_1'", color: 'black'});
var s1 = board.create('segment', [p3, p1s], {color: 'black'});

var par2 = board.create('parallel', [s2, p1s], {visible: false});
var p2 = board.create('intersection', [par2, l1], {name:"p_2", color: 'black'});
var s4 = board.create('segment', [p2, p1s], {color: 'black'});

var s5 = board.create('segment', [p3, p2s], {color: 'red'});
var s6 = board.create('segment', [p2, p3s], {color: 'red'});