Orthogonal axis affinity

From JSXGraph Wiki
Revision as of 19:23, 27 June 2021 by A WASSERMANN (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.



The underlying JavaScript code

JXG.Options.label.autoPosition = true;
JXG.Options.text.fontSize = 16;
JXG.Options.line.strokeWidth = 0.8;

var board = JXG.JSXGraph.initBoard('jxgbox', { boundingbox: [-5, 5, 5, -5], axis: true, showClearTraces: true});

var O = board.create('point', [0,0], {name: 'O', fixed: true});
var k0 = board.create('circle', [O, 4], {fixed: true, strokeWidth: 0.8});
var k1 = board.create('circle', [O, 2], {fixed: true, strokeWidth: 0.8});

var B = board.create('glider', [2.65, 3, k0], {name: 'B'});
var li = board.create('line', [O, B], {straightFirst: false});
var g = board.create('parallel', [B, board.defaultAxes.x]);

var P = board.create('intersection', [li, k1, 0], {name: 'P',  trace: true});
var gs = board.create('parallel', [P, board.defaultAxes.y]);
var X = board.create('intersection', [gs, board.defaultAxes.x, 0], {name: 'X'});
var Ps = board.create('intersection', [gs, g, 0], {name: "P'", trace: true, color: 'blue'});

var pol = board.create('polygon', [O, X, P, Ps, B], {fillColor: 'yellow'});