SHARE
TWEET

Untitled

a guest Oct 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top