Difference between revisions of "Animation III"

From JSXGraph Wiki
Jump to navigationJump to search
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(){-p.moveTo([Math.sin(i*Math.PI*2/12),Math.cos(i*Math.PI*2/12)],800); i++; },1000);
+
setInterval(function(){
 +
  var i;
 +
  for (i=0;i<p.length;i++) {
 +
      p.moveTo([Math.random(),Math.Math.random()],400);
 +
  }
 +
},1000);
 
</jsxgraph>
 
</jsxgraph>

Revision as of 17:38, 30 September 2009