Difference between revisions of "Affine ratio"

From JSXGraph Wiki
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
The more popular name seems to be ''simple ratio'', in German ''Teilverhältnis'':
 +
 +
:<math>
 +
TV(p, q, t) := \lambda \in K \mbox{ such that } \vec{pt} = \lambda\cdot\vec{pq}
 +
</math>
 +
 
<jsxgraph width="500" height="500">
 
<jsxgraph width="500" height="500">
 
JXG.Options.label.autoPosition = true;
 
JXG.Options.label.autoPosition = true;
Line 7: Line 13:
 
var p = board.create('point', [-3,0], {name: 'p'});
 
var p = board.create('point', [-3,0], {name: 'p'});
 
var q = board.create('point', [3,0], {name: 'q'});
 
var q = board.create('point', [3,0], {name: 'q'});
var pq = board.create('segment', [p, q]);
+
var pq = board.create('line', [p, q]);
 
var t = board.create('glider', [-2, 0, pq], {name: 't'});
 
var t = board.create('glider', [-2, 0, pq], {name: 't'});
var txt = board.create('text', [1, 2, function() { return "&lambda; =" + t.position.toFixed(2); }]);
+
var txt = board.create('text', [1, 2, function() { return "&lambda; = " + t.position.toFixed(2); }]);
 
</jsxgraph>
 
</jsxgraph>
 +
 +
=== The underlying JavaScript code ===
 +
 +
<source lang="javascript">
 +
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,0], {name: 'p'});
 +
var q = board.create('point', [3,0], {name: 'q'});
 +
var pq = board.create('line', [p, q]);
 +
var t = board.create('glider', [-2, 0, pq], {name: 't'});
 +
var txt = board.create('text', [1, 2, function() { return "&lambda; = " + t.position.toFixed(2); }]);
 +
</source>
  
 
[[Category:Examples]]
 
[[Category:Examples]]
 
[[Category:Geometry]]
 
[[Category:Geometry]]

Latest revision as of 09:57, 4 May 2021

The more popular name seems to be simple ratio, in German Teilverhältnis:

[math] TV(p, q, t) := \lambda \in K \mbox{ such that } \vec{pt} = \lambda\cdot\vec{pq} [/math]

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,0], {name: 'p'});
var q = board.create('point', [3,0], {name: 'q'});
var pq = board.create('line', [p, q]);
var t = board.create('glider', [-2, 0, pq], {name: 't'});
var txt = board.create('text', [1, 2, function() { return "&lambda; = " + t.position.toFixed(2); }]);