Thales theorem

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

[math]TV(p,q,t)[/math] is the affine / simple ratio of the collinear points p, q and t.


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 p = board.create('point', [-3, -2], {name:'p'});
var q1 = board.create('point', [0, -2], {name:'q_1'});
var q2 = board.create('point', [-1, 0.5], {name:'q_2'});
var l1 = board.create('line', [p, q1], {straightFirst: false});
var l2 = board.create('line', [p, q2], {straightFirst: false});
var l3 = board.create('line', [q1, q2], {color: 'black'});

var q3 = board.create('point', [2.5, 2], {visible: false});
var l4 = board.create('parallel', [l3, q3], {color: 'black'});
var t1 = board.create('intersection', [l4, l1], {name: 't_1'});
var t2 = board.create('intersection', [l4, l2], {name: 't_2'});

var txt1 = board.create('text', [-3, -3, function() { return 'TV(p,q_1,t_1) = ' + (t1.Dist(p) / q1.Dist(p)).toFixed(2); }]);
var txt2 = board.create('text', [-3, -4, function() { return 'TV(p,q_2,t_2) = ' + (t2.Dist(p) / q2.Dist(p)).toFixed(2); }]);