Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. /*
  2. Addie Dale
  3. Regan Computer Science 1st hour
  4. 101 Dots Follow Along
  5. */
  6.  
  7. size(500,500);
  8. int dotCount = 1;
  9.  
  10. int xCoord = int(random(0,width));
  11. int yCoord = int(random(0,height));
  12. noStroke();
  13.  
  14. while(dotCount <= 101);
  15. {
  16. dotColor = int(random(1,4));
  17. if (dotColor == 1)
  18. {
  19. fill(0,0,255);
  20. }
  21. else if (dotColor == 2)
  22. {
  23. fill(0,255,0);
  24. }
  25. else
  26. {
  27. fill(255,0,0);
  28. }
  29. ellipse(xCoord, yCoord, 30,30);
  30. xCoord = int(random(0,width));
  31. yCoord = int(random(0,height));
  32. dotCount++;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement