> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://dflab.sketchpad.cc/sp/pad/view/ro.ZkQty3Fw9YY/rev.16
 * 
 * authors: 
 *   Liliana Dantas

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



float px[];
float py[];

int num_particles = 5;

void setup() {
  size(500, 500);
  background(0);
  
  px = new float[num_particles];
  py = new float[num_particles];
  
  for (int i = 0; i < num_particles; i++) {
    px[i] = random(width);
    py[i] = random(height);
  }
}

void draw() {
  background(0);
  
  for (int i = 0; i < num_particles; i = i+1) {
        px[i] = constrain (px[i] + random (-20, 20), 125, 375);
        py[i] = constrain (py[i] + random (-20, 20), 125, 375);
 
        ellipse (px[i], py[i], 5, 10);
  }
}