File: ex1.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 (56 lines) | stat: -rw-r--r-- 1,672 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<html>
<head>
   <title>Watt | JSXGraph Example</title>
   <link rel="stylesheet" type="text/css" href="../../distrib/jsxgraph.css" />
   <script type="text/javascript" src="../../distrib/jsxgraphcore.js"></script>
    <script type="text/javascript" src="../../src/CinderellaReader.js"></script>
</head>
<body>
<div id="debug" style="display: none"></div>
<center>
<div style="width: 1000px;">
    <div style="width:600px; height: 510px;">
  <div id="jxgbox" class="jxgbox" style="width:600px; height:500px; text-align: left; float: left;"></div>
  <div id="polynomials" style="display: none; width: 600px; height: 500px; margin-left: 10px; text-align: left; padding-left: -200px;"></div>
  </div>

    <div style="width: 800px; margin-top: 10px;">
  <form>
      <input type="button" onclick="computeLocus();" value="Calculate locus" />
  </form>
  </div>
</div>
</center>
   <script type="text/javascript">
    /* <![CDATA[ */

   board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-2, 5, 10, -3], axis: true, grid: false,
                                  keepaspectratio: true, showcopyright: false});

  A = board.create('point', [0,0]);
  B = board.create('point', [2,0]);
  C = board.create('point', [3, -3]);

//  k = board.create('circle', [A, B]);

  g = board.create('line', [A, B]);
  h = board.create('line', [A, C]);
  D = board.create('glider', [4, 5, g], {name: "D"});

  R = board.create('reflection', [D, h]);

  k = board.create('circle', [R, 4]);
  i = board.create('intersection', [k, g, 0]);

  m = board.create('midpoint', [i, C]);



  function computeLocus() {
    board.create('locus', [m]);
  }
  /* ]]> */
  </script>
<br/>
</body>
</html>