# Affine ratio

From JSXGraph Wiki

Revision as of 09:57, 4 May 2021 by A WASSERMANN (talk | contribs)

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 "λ = " + t.position.toFixed(2); }]);
```