Debian Codegraph @

examples/adg/ex1.html

raw
1 <html>
2 <head>
3 <title>Watt | JSXGraph Example</title>
4 <link rel="stylesheet" type="text/css" href="../../distrib/jsxgraph.css" />
5 <script type="text/javascript" src="../../distrib/jsxgraphcore.js"></script>
6 <script type="text/javascript" src="../../src/CinderellaReader.js"></script>
7 </head>
8 <body>
9 <div id="debug" style="display: none"></div>
10 <center>
11 <div style="width: 1000px;">
12 <div style="width:600px; height: 510px;">
13 <div id="jxgbox" class="jxgbox" style="width:600px; height:500px; text-align: left; float: left;"></div>
14 <div id="polynomials" style="display: none; width: 600px; height: 500px; margin-left: 10px; text-align: left; padding-left: -200px;"></div>
15 </div>
16
17 <div style="width: 800px; margin-top: 10px;">
18 <form>
19 <input type="button" onclick="computeLocus();" value="Calculate locus" />
20 </form>
21 </div>
22 </div>
23 </center>
24 <script type="text/javascript">
25 /* <![CDATA[ */
26
27 board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-2, 5, 10, -3], axis: true, grid: false,
28 keepaspectratio: true, showcopyright: false});
29
30 A = board.create('point', [0,0]);
31 B = board.create('point', [2,0]);
32 C = board.create('point', [3, -3]);
33
34 // k = board.create('circle', [A, B]);
35
36 g = board.create('line', [A, B]);
37 h = board.create('line', [A, C]);
38 D = board.create('glider', [4, 5, g], {name: "D"});
39
40 R = board.create('reflection', [D, h]);
41
42 k = board.create('circle', [R, 4]);
43 i = board.create('intersection', [k, g, 0]);
44
45 m = board.create('midpoint', [i, C]);
46
47
48
49 function computeLocus() {
50 board.create('locus', [m]);
51 }
52 /* ]]> */
53 </script>
54 <br/>
55 </body>
56 </html>