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
|
<html>
<head>
<title>JSXGraph example</title>
<link rel="stylesheet" type="text/css" href="../distrib/jsxgraph.css" />
<script type="text/javascript" src="../distrib/jsxgraphcore.js"></script>
</head>
<body>
<h2>Transformations part 2</h2>
<div id="jxgbox" class="jxgbox" style="width:700px; height:500px;"></div>
<div id="debug" style="display:none;"></div>
<script type="text/javascript">
/* <![CDATA[ */
// Globale Variable
var p0,p1;
board = JXG.JSXGraph.initBoard('jxgbox', {originX: 250, originY: 300, unitX: 50, unitY: 50});
b1axisx = board.createElement('axis', [[0,0], [0,1]], {});
b1axisy = board.createElement('axis', [[0,0], [1,0]], {});
p0 = board.createElement('point', [0,3], {style:5, name:'A',strokecolor:'blue', fillcolor:'red'});
p1 = board.createElement('point', [3,3], {style:5, name:'B',strokecolor:'blue', fillcolor:'red'});
// l1 = board.createElement('line', [p0,p1], {});
// c1 = board.createElement('circle', [p0,p1], {});
f = board.createElement('curve',
['x',function(x){return Math.tan(x)*p1.X();}],
{ name:'c',curveType:'plot'});
p2 = board.createElement('glider', [0,3,f], {style:5, name:'C',strokecolor:'blue', fillcolor:'red'});
board.update();
/* ]]> */
</script>
</body>
</html>
|