generartiv_particules1/particules_random1.pde

ParticuleSystem system;

/* -------------------------------------------------
 *   _____ ______ _______ _    _ _____  
 *  / ____|  ____|__   __| |  | |  __ \ 
 * | (___ | |__     | |  | |  | | |__) |
 *  \___ \|  __|    | |  | |  | |  ___/ 
 *  ____) | |____   | |  | |__| | |     
 * |_____/|______|  |_|   \____/|_|     
 -----------------------------------------------------*/
void setup() {
  size(1280, 720);
  frameRate(25);
  background(0);
  smooth();

  system = new ParticuleSystem();
}

/* ------------------------------------------------------
 *  _____  _____       __          __
 * |  __ \|  __ \     /\ \        / /
 * | |  | | |__) |   /  \ \  /\  / / 
 * | |  | |  _  /   / /\ \ \/  \/ /  
 * | |__| | | \ \  / ____ \  /\  /   
 * |_____/|_|  \_\/_/    \_\/  \/  
 --------------------------------------------------------*/

void draw() {
  system.run();
  saveFrame("data/frame-######.jpg");
}


/* ---------------------------------------------------------
 *  ______ _    _ _   _  _____ _______ _____ ____  _   _  _____ 
 * |  ____| |  | | \ | |/ ____|__   __|_   _/ __ \| \ | |/ ____|
 * | |__  | |  | |  \| | |       | |    | || |  | |  \| | (___  
 * |  __| | |  | | . ` | |       | |    | || |  | | . ` |\___ \ 
 * | |    | |__| | |\  | |____   | |   _| || |__| | |\  |____) |
 * |_|     \____/|_| \_|\_____|  |_|  |_____\____/|_| \_|_____/ 
 ----------------------------------------------------------------*/

// ------------------------ Numero du pixel dans le tableau pixels[]
int numPixel(int x, int y) {
  return y*width + x;
}