Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /*101 dots
  2. garland watson
  3. 10/16/2019*/
  4. //setup
  5. size(500,500);
  6. int dotcount = 1;
  7. int dotcolor;
  8. int x = int(random(0,width));
  9. int y = int(random(0,height));
  10. noStroke();
  11. //actual work
  12. while(dotcount<= 101){
  13. dotcolor = int(random(1,5));
  14. if (dotcolor==1) {
  15. fill(0,0,random(255));
  16. }
  17. else if (dotcolor == 2){
  18. fill(0,random(255),0);
  19. }
  20. else {
  21. fill(random(255),0,0);
  22. }
  23. ellipse(x,y,30,30);
  24. x = int(random(0,width));
  25. y =int(random(0,height));
  26. dotcount++;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement