Cours1 5. Processing en pratique: animation - picardlimpens/TechArtsNum GitHub Wiki

/*************************************************************

Animation: un cercle qui grandit

**************************************************************/

int diam = 10;
float centX, centY;

void setup() { 

    size(500, 300);  `
    smooth(); 
    background(180); 
    centX = width/2; 
    centY = height/2; 
    stroke(0); 
    strokeWeight(5); 
    fill(255, 50);

}


void draw() {

      if (diam <= 400) {

        background(180);
        ellipse(centX, centY, diam, diam); 
        diam += 10;

      }    

}