/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://dflab.sketchpad.cc/sp/pad/view/ro.DxNM4QLYFXJ/rev.883
*
* authors:
* Sara Reis
*
* 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 = 500;
void setup() {
size(500, 500);
background(0,0,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(204,255,000);
for (int i = 0; i < num_particles; i = i+1) {
px[i] = constrain (px[i] + random (-50, 50), 0, width);
py[i] = constrain (py[i] + random (-50, 50), 0, height);
strokeWeight(90);
fill(204, 153, 255)
ellipse (px[i], py[i], 5, 5);
}
}