FreeArtBureau_dialDemo/Student_Sketches/Hannah_Anjou_EX02_3_MW/Hannah_Anjou_EX02_3_MW.pde
/**
 * Hannah Anjou
 *
 */


color[] mesCouleurs = {#4AF5B7, #F5DC4A, #774AF5, #F54A6A, #4AF5EB,  #774AF5};
float rectSize;

void setup() {
  size(500, 500);
  noStroke();
  rectSize = random(1, 50);
  rectMode(CENTER);
}

void draw() {
  background(0);
  randomSeed(100);
 
  for (int i=0; i<6; i++) {
    float x = random(50, 450);
    float y = random(50, 450);
    float vitesse = random(0.01, 0.1);
    
    fill(mesCouleurs[i], 200);
    pushMatrix();
    translate(x, y);
    rotate(radians(millis())*vitesse);//temps en millieme de secondes
     
    float randFreq = random(0.004, 0.01); 
    float sinus = sin(frameCount * randFreq)*random(10);
    float motion = map(sinus, -10, 10, 50, 490);
    rect(0, 0, rectSize + motion, rectSize + motion);
    popMatrix();
  }
}