Debian Codegraph @

examples/animation/movealong.html

raw symbols SCIP
1 <html>
2 <head>
3 <title>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 </head>
7 <body>
8 <h2>Move a point along a given path</h2>
9
10 <div style="width:800px">
11 <div id="jxgbox" class="jxgbox" style="width:800px; height:800px; float:left"></div>
12 </div>
13 <div id="debug" style="display:block;"></div>
14 <script type="text/javascript">
15 /* <![CDATA[ */
16
17 (function() {
18 var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10], keepaspectratio: true, axis: true, grid: false}),
19 path = [[-8, -7], [-6, 3], [-2, -1], [4, -4], [9, 0]],
20 point = board.create('point', [-8, -7]),
21 points = [], i;
22
23 for(i=0; i<path.length; i++)
24 points[i] = board.create('point', path[i], {size: 2});
25 point.moveAlong(path, 4000);
26 })();
27
28
29 /* ]]> */
30 </script>
31 </body>
32 </html>