Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. //Create a single loop a. Change the size of an ellipse based on it's position in the loop (i.e. ellipses get smaller or larger)
  2. //Create a nested loop.
  3. //Use your mouse position to add interaction to your nested loop.
  4. int x,y,w,h;
  5.  
  6. void setup(){
  7. background(#FFCBF7);
  8. size(500,500);
  9.  
  10.  
  11. }
  12. void draw(){
  13. background(#FFCBF7);
  14. for(int i=1; i<20;i++){
  15. for (int j=1;j<20;j++)
  16. {
  17. x=mouseX;
  18. y=mouseY;
  19. w=x;
  20. h=y/2;
  21. ellipse(x,y,w,h);
  22.  
  23.  
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement