Difference between revisions of "Drag Polygons"

From JSXGraph Wiki
Jump to: navigation, search
(Created page with "<jsxgraph box="jxgbox" width="500" height="500"> var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10]}); var a = brd.create('point', [-2, 1]); var b = b...")
 
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
 
  var p = brd.create('polygon', [a, b, c, d], {hasInnerPoints: true});
 
  var p = brd.create('polygon', [a, b, c, d], {hasInnerPoints: true});
 
</jsxgraph>
 
</jsxgraph>
 +
 +
===JavaScript Code===
 +
<source lang="javascript">
 +
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10]});
 +
var a = brd.create('point', [-2, 1]);
 +
var b = brd.create('point', [-4, -5]);
 +
var c = brd.create('point', [3, -6]);
 +
var d = brd.create('point', [2, 3]);
 +
var p = brd.create('polygon', [a, b, c, d], {hasInnerPoints: true});
 +
</source>
 +
[[Category:Examples]]

Latest revision as of 16:56, 20 February 2013

JavaScript Code

 var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10]});
 var a = brd.create('point', [-2, 1]);
 var b = brd.create('point', [-4, -5]);
 var c = brd.create('point', [3, -6]);
 var d = brd.create('point', [2, 3]);
 var p = brd.create('polygon', [a, b, c, d], {hasInnerPoints: true});