JSXGraph logo
JSXGraph
JSXGraph share

Share

Orthogonal axis affinity
QR code
<iframe 
    src="http://jsxgraph.uni-bayreuth.de/share/iframe/orthogonal-axis-affinity" 
    style="border: 1px solid black; overflow: hidden; width: 550px; aspect-ratio: 55 / 65;" 
    name="JSXGraph example: Orthogonal axis affinity" 
    allowfullscreen
></iframe>
This code has to
<div id="board-0-wrapper" class="jxgbox-wrapper " style="width: 100%; ">
   <div id="board-0" class="jxgbox" style="aspect-ratio: 1 / 1; width: 100%;" data-ar="1 / 1"></div>
</div>

<script type = "text/javascript"> 
    /*
    This example is licensed under a 
    Creative Commons Attribution ShareAlike 4.0 International License.
    https://creativecommons.org/licenses/by-sa/4.0/
    
    Please note you have to mention 
    The Center of Mobile Learning with Digital Technology
    in the credits.
    */
    
    const BOARDID = 'board-0';

    JXG.Options.label.autoPosition = true;
    JXG.Options.text.fontSize = 16;
    JXG.Options.line.strokeWidth = 0.8;
    
    var board = JXG.JSXGraph.initBoard(BOARDID, {
        boundingbox: [-5, 5, 5, -5],
        axis: true,
        showClearTraces: true,
        keepaspectratio: 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' });
 </script> 
/*
This example is licensed under a 
Creative Commons Attribution ShareAlike 4.0 International License.
https://creativecommons.org/licenses/by-sa/4.0/

Please note you have to mention 
The Center of Mobile Learning with Digital Technology
in the credits.
*/

const BOARDID = 'your_div_id'; // Insert your id here!

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

var board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-5, 5, 5, -5],
    axis: true,
    showClearTraces: true,
    keepaspectratio: 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' });
<jsxgraph width="100%" aspect-ratio="1 / 1" title="Orthogonal axis affinity" description="This construction was copied from JSXGraph examples database: BTW HERE SHOULD BE A GENERATED LINKuseGlobalJS="false">
   /*
   This example is licensed under a 
   Creative Commons Attribution ShareAlike 4.0 International License.
   https://creativecommons.org/licenses/by-sa/4.0/
   
   Please note you have to mention 
   The Center of Mobile Learning with Digital Technology
   in the credits.
   */
   
   JXG.Options.label.autoPosition = true;
   JXG.Options.text.fontSize = 16;
   JXG.Options.line.strokeWidth = 0.8;
   
   var board = JXG.JSXGraph.initBoard(BOARDID, {
       boundingbox: [-5, 5, 5, -5],
       axis: true,
       showClearTraces: true,
       keepaspectratio: 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' });
</jsxgraph>

Orthogonal axis affinity

This example shows how to construct an ellipse as the image of a circle under an affine map. The glider $B$ rotates on the outer circle around the origin and determines the position of the point $P$ on the inner circle as the intersection of the line $OB$ and the inner circle. The vertical line through $P$ and the horizontal line through $B$ intersect in the point $P'$ whose locus is an ellipse having the inner circle's radius as semi-minor axis and the radius of the outer circle as semi-major axis.
// Define the id of your board in BOARDID

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

var board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-5, 5, 5, -5],
    axis: true,
    showClearTraces: true,
    keepaspectratio: 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' });

license

This example is licensed under a Creative Commons Attribution ShareAlike 4.0 International License.
Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits.