File: semicircle.html

package info (click to toggle)
jsxgraph 1.3.5+dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 26,044 kB
  • sloc: xml: 5,869; java: 1,072; python: 747; php: 192; makefile: 146; sh: 47
file content (37 lines) | stat: -rw-r--r-- 1,545 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
<html>
<head>
   <title>JSXGraph example</title>
   <link rel="stylesheet" type="text/css" href="../distrib/jsxgraph.css" />
   <script type="text/javascript" src="/javascript/prototype/prototype.js"></script>
   <script type="text/javascript" src="../src/loadjsxgraph.js"></script>
   <script type="text/javascript" src="../src/CanvasRenderer.js"></script>
</head>
<body>
<h2>Semicircles and Circumcircle Arcs/Sectors</h2>
<div id="jxgbox" class="jxgbox" style="width:600px; height:450px; "></div>
<div id="debug" style="display:block;"></div>
<script type="text/javascript">
/* <![CDATA[ */
    (function(){
        var board = JXG.JSXGraph.initBoard('jxgbox', {grid:true, originX: 250, originY: 300, unitX: 50, unitY: 50});
        
        var p1 = board.create('point', [0, 0], {name:"A"}); 
        var p2 = board.create('point', [0, 4], {name:"B"});
        var p3 = board.create('point', [4, 0], {name:"C"});
        var p4 = board.create('point', [2, 2], {name:"D"});
        
        var t = board.create('semicircle',[p2,p3]);
        var u = board.create('semicircle',[p4,p3]);
        var v = board.create('semicircle',[p4,p1]);

        var p6 = board.create('point', [0, 0], {name:"F"});
        var p7 = board.create('point', [-2, 1], {name:"G"});
        var p8 = board.create('point', [0, 2], {name:"H"});
        var u = board.create('circumcirclesector',[p8, p7, p6], {fillColor:'#ffaa0080'});   // RGBA color
        var w = board.create('circumcirclearc',[p1,p8,p4]);
        
    })();
/* ]]> */
</script>
</body>
</html>