Ref­r­e­s­h­e­r

by Harrison McEwen

A refresher to see if i can still do this

  • Show Code
/**@peep sketch */ 
 
float counter;
float wiggler;
 
void setup() {
 
size(500,500);
 
counter = -50;
wiggler = 0;
 
strokeWeight(0.5);
 
}
 
void draw() {
  stroke(0);
 noFill();
 ellipse(width/2+wiggler, counter, 50,50);
 
 //X axis Movement
 wiggler = sin(counter*0.05)*20;
 
 //Y axis movement
 if (counter < height+50) {
   counter++
 } else { 
   counter = -50;
 }
 
  //Fader
  noStroke();
 fill(255,10);
 rect(0,0,width,height);
 
}

Comments