Animation II: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
i = -1; | i = -1; | ||
setInterval(function(){-p.moveTo([Math.sin(i*Math.PI*2/12),Math.cos(i*Math.PI*2/12)], | setInterval(function(){-p.moveTo([Math.sin(i*Math.PI*2/12),Math.cos(i*Math.PI*2/12)],800); i++; },1000); | ||
</jsxgraph> | </jsxgraph> | ||
Line 15: | Line 15: | ||
i = -1; | i = -1; | ||
setInterval(function(){-p.moveTo([Math.sin(i*Math.PI*2/12),Math.cos(i*Math.PI*2/12)], | setInterval(function(){-p.moveTo([Math.sin(i*Math.PI*2/12),Math.cos(i*Math.PI*2/12)],800); i++; },1000); | ||
</source> | </source> | ||
[[Category:Examples]] | [[Category:Examples]] |
Revision as of 15:32, 30 September 2009
The JavaScript code
brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-1.5,1.5,1.5,-1.5], keepaspectratio:true, axis:true});
p = brd.createElement('point',[0,1],{face:'o', size:5, strokeColor:'red', fillOpacity:0.3, strokeOpacity: 0.3});
brd.createElement('arrow',[[0,0],p],{strokeWidth:5, strokeOpacity:0.7, strokeColor:'blue'});
i = -1;
setInterval(function(){-p.moveTo([Math.sin(i*Math.PI*2/12),Math.cos(i*Math.PI*2/12)],800); i++; },1000);