Cours2 1.Texture: Manipulation d'images - picardlimpens/TechArtsNum GitHub Wiki

// Exemple d'images: https://www.google.fr/search?q=image+wikimedia&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiNpovStpLKAhWGfhoKHak7CZcQ_AUIBygB&biw=1440&bih=711#tbs=sur:f%2Cic:gray&tbm=isch&q=leaves

float x, y, r;
PImage nyt01;


void setup() {

    nyt01 = loadImage("monImage.jpg");
    size(600, 600);
    smooth();
    background(255);


    for(int i=0; i<100; i++) {

      tint(random(150,255), random(100,150));

      x = random(width);
      y = random(height);
      r = random(0, TWO_PI);
  
      pushMatrix();
      translate(x, y);
      scale(random(0.8,1.1));
      rotate(r);

      image(nyt01,  -nyt01.width/2, -nyt01.height/2);
      popMatrix();
    }

}

void draw() {

}