Thales theorem: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
TV(p,q,t) is the affine ratio of the collinear points p, q and t. | TV(p,q,t) is the affine / simple ratio of the collinear points p, q and t. | ||
<jsxgraph width="500" height="500"> | <jsxgraph width="500" height="500"> |
Revision as of 07:04, 3 May 2021
TV(p,q,t) 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); }]);