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