> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://fgcs.sketchpad.cc/sp/pad/view/ro.mv$ktieaMxY/rev.449
 * 
 * authors: 
 *   Markus Roberts

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



// Pressing Control-R will render this sketch.

int next_star_frame;  // when to make the next star

void setup() {  // this is run once.   
    size(500, 500); 
    background(0);  // Black sky
    smooth();
    frameRate(30);
    next_star_frame = 5; // First star on frame 5
} 

void draw() {  // this is run repeatedly.  
    if (frameCount >= next_star_frame) {   // wait for it...
       stroke(255);               // white
       strokeWeight(random(5));   // random size
       point(random(width),random(height)); // random location
       // Decide how long to wait for the next star (initially, 0..2 frames, but we slow down)
       next_star_frame = frameCount+random(3+frameCount/50);
    }
}