Animation III: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
for (i=0;i<len;i++) { | for (i=0;i<len;i++) { | ||
p[i] = brd.createElement('point',[Math.random(),Math.random()], | p[i] = brd.createElement('point',[Math.random(),Math.random()], | ||
{face:'o', size:8, strokeColor:'red', fillColor:'red', fillOpacity:0.4, strokeOpacity: 0.4, withLabel:false}); | {face:'o', size:8, strokeColor:'red', fillColor:'red', fillOpacity:0.4, strokeOpacity:0.4, withLabel:false}); | ||
} | } | ||
setInterval(function(){ | |||
var i; | |||
for (i=0;i<p.length;i++) { | |||
p.moveTo([Math.random(),Math.Math.random()],400); | |||
} | |||
},1000); | |||
</jsxgraph> | </jsxgraph> |