Share JSXGraph: example "Polygon dragging"

JSXGraph
Share JSXGraph: example "Polygon dragging"
This website is a beta version. The official release will be in **2024**.

Polygon dragging

With the attribute `hasInnerPoints` a polygon can be dragged around.
// Define the id of your board in BOARDID

 const board = JXG.JSXGraph.initBoard(BOARDID, {boundingbox: [-10, 10, 10, -10]});

// Vertices of the polygon
 var a = board.create('point', [-2, 1]);
 var b = board.create('point', [-4, -5]);
 var c = board.create('point', [3, -6]);
 var d = board.create('point', [2, 3]);

// Polygon
 var p = board.create('polygon', [a, b, c, d], {hasInnerPoints: true});