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="../distrib/jsxgraphcore.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>
|