Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. size(500,300);
  2. background(255);
  3. strokeWeight(0.5);
  4. smooth();
  5.  
  6. int centX = 250;
  7. int centY = 150;
  8.  
  9. float x, y;
  10. for (int i = 0; i<100; i++) {
  11. float lastx = -999;
  12. float lasty = -999;
  13. float radiusNoise = random(10);
  14. float radius = 10;
  15. stroke(random(20), random(50), random(70), 80);
  16. int startangle = int(random(360));
  17. int endangle = 1440 + int(random(1440));
  18. int anglestep = 5 + int(random(3));
  19. for (float ang = startangle; ang <= 1440 + random(1440); ang += anglestep) {
  20. radiusNoise += 0.05;
  21. radius += 0.5;
  22. float thisRadius = radius + (noise(radiusNoise) * 200) - 100;
  23. float rad = radians(ang);
  24. x = centX + (thisRadius * cos(rad));
  25. y = centY + (thisRadius * sin(rad));
  26. if (lastx > -999) {
  27. line(x,y,lastx,lasty);
  28. }
  29. lastx = x;
  30. lasty = y;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement