sunflower pattern


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var i:Number = 0;
  2. var angle:Number = 0;
  3. mc.graphics.lineStyle(1, 0xcccccc);
  4. for(i; i<10000; i++){
  5. angle += 2.3998;
  6. var cr:Circ = new Circ();
  7. cr.x=Math.cos(angle) * i*1;
  8. cr.y=Math.sin(angle) * i*1;
  9. mc.addChild(cr);
  10. if(i%3 == 0){
  11. mc.graphics.lineTo(cr.x,cr.y);
  12. }
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.