File: basic.html

package info (click to toggle)
jsxgraph 1.10.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 24,804 kB
  • sloc: javascript: 82,299; xml: 5,869; java: 1,072; php: 281; makefile: 184; python: 174; cpp: 76; sh: 12
file content (35 lines) | stat: -rw-r--r-- 981 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <script type="text/javascript" src="../../distrib/jsxgraphcore.js"></script>
    <link rel="stylesheet" type="text/css" href="../../distrib/jsxgraph.css" />
    <script type="text/javascript" src="../jquery-3.5.1.min.js"></script>
</head>
<body>
<div id="box" style="width:500px; height:500px;"></div>

<script type="text/javascript">
    (function () {
        var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-5, 5, 5, -5], axis: true}),
            points = [], no = 3, i,
            group;

        for (i = 0; i < no; i++) {
            points.push(board.create('point', [Math.random()*8-4, Math.random()*8-4]));
        }

        var test = board.create('polygon', points);

        board.create('polygon', points);

        group = board.create('group', points);
        //group.addPoints(points);
        //group.removePoint(points[1]);

        board.removeObject(test);
    })();
</script>

</body>
</html>