Difference between revisions of "Parallelogram"

From JSXGraph Wiki
Jump to navigationJump to search
(Created page with "<html> <script type="text/javascript" src="/distrib/MathJax/MathJax.js"></script> </html> <jsxgraph width="500" height="500"> JXG.Options.label.autoPosition = true; JXG.O...")
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
   <script type="text/javascript" src="/distrib/MathJax/MathJax.js"></script>
 
   <script type="text/javascript" src="/distrib/MathJax/MathJax.js"></script>
 
</html>
 
</html>
 
 
  
 
<jsxgraph width="500" height="500">
 
<jsxgraph width="500" height="500">
Line 13: Line 11:
  
 
var p = board.create('point', [-3,-3], {name:'\\(p\\)'});
 
var p = board.create('point', [-3,-3], {name:'\\(p\\)'});
var q = board.create('point', [1, -3], {name:'\\(q\\)'});
+
var q = board.create('point', [2, -3], {name:'\\(q\\)'});
var s = board.create('point', [0, 1], {name:'\\(s\\)'});
+
var s = board.create('point', [-1, 1], {name:'\\(s\\)'});
var r = board.create('point', [4, 1], {name:'\\(r\\)'});
+
var r = board.create('parallelpoint', [p, q, s], {name:'\\(r\\)'});
  
 
var pq = board.create('arrow', [p, q], {withLabel: true, name:'\\(\\vec{pq}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
 
var pq = board.create('arrow', [p, q], {withLabel: true, name:'\\(\\vec{pq}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
 +
var sr = board.create('arrow', [s, r], {withLabel: true, name:'\\(\\vec{sr}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
 +
var ps = board.create('arrow', [p, s], {withLabel: true, name:'\\(\\vec{ps}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
 
var qr = board.create('arrow', [q, r], {withLabel: true, name:'\\(\\vec{qr}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
 
var qr = board.create('arrow', [q, r], {withLabel: true, name:'\\(\\vec{qr}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
var pr = board.create('arrow', [p, r], {withLabel: true, name:'\\(\\vec{pr}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
+
 
 +
var pr = board.create('arrow', [p, r], {});
 
</jsxgraph>
 
</jsxgraph>
  
Line 32: Line 33:
 
var board = JXG.JSXGraph.initBoard("jxgbox", {boundingbox: [-5,5,5,-5], showCopyright:false, showNavigation:false});
 
var board = JXG.JSXGraph.initBoard("jxgbox", {boundingbox: [-5,5,5,-5], showCopyright:false, showNavigation:false});
  
var p = board.create('point', [-3,-3], {name:'p'});
+
var p = board.create('point', [-3,-3], {name:'\\(p\\)'});
var q = board.create('point', [0, 2], {name:'q'});
+
var q = board.create('point', [2, -3], {name:'\\(q\\)'});
var r = board.create('point', [3, -3], {name:'r'});
+
var s = board.create('point', [-1, 1], {name:'\\(s\\)'});
 +
var r = board.create('parallelpoint', [p, q, s], {name:'\\(r\\)'});
  
 
var pq = board.create('arrow', [p, q], {withLabel: true, name:'\\(\\vec{pq}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
 
var pq = board.create('arrow', [p, q], {withLabel: true, name:'\\(\\vec{pq}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
 +
var sr = board.create('arrow', [s, r], {withLabel: true, name:'\\(\\vec{sr}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
 +
var ps = board.create('arrow', [p, s], {withLabel: true, name:'\\(\\vec{ps}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
 
var qr = board.create('arrow', [q, r], {withLabel: true, name:'\\(\\vec{qr}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
 
var qr = board.create('arrow', [q, r], {withLabel: true, name:'\\(\\vec{qr}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
var pr = board.create('arrow', [p, r], {withLabel: true, name:'\\(\\vec{pr}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
+
 
 +
var pr = board.create('arrow', [p, r], {});
 
</source>
 
</source>
 
[[Category:Examples]]
 
[[Category:Examples]]
 
[[Category:Geometry]]
 
[[Category:Geometry]]

Latest revision as of 11:44, 12 April 2021


The underlying JavaScript code

JXG.Options.label.autoPosition = true;
JXG.Options.text.useMathJax = true;
JXG.Options.text.fontSize = 20;

var board = JXG.JSXGraph.initBoard("jxgbox", {boundingbox: [-5,5,5,-5], showCopyright:false, showNavigation:false});

var p = board.create('point', [-3,-3], {name:'\\(p\\)'});
var q = board.create('point', [2, -3], {name:'\\(q\\)'});
var s = board.create('point', [-1, 1], {name:'\\(s\\)'});
var r = board.create('parallelpoint', [p, q, s], {name:'\\(r\\)'});

var pq = board.create('arrow', [p, q], {withLabel: true, name:'\\(\\vec{pq}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
var sr = board.create('arrow', [s, r], {withLabel: true, name:'\\(\\vec{sr}\\)', label:{position: 'top', parse: false}, lastArrow: {type: 4, size: 8}});
var ps = board.create('arrow', [p, s], {withLabel: true, name:'\\(\\vec{ps}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});
var qr = board.create('arrow', [q, r], {withLabel: true, name:'\\(\\vec{qr}\\)', label:{position: 'top'}, lastArrow: {type: 4, size: 8}});

var pr = board.create('arrow', [p, r], {});