> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://dflab.sketchpad.cc/sp/pad/view/ro.-BoatMe0RIa/rev.240
 * 
 * authors: 
 *   Rogerio Silva

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



// This sketch builds on a prior work, "TECNICANO", created by Sara Reis
// http://dflab.sketchpad.cc/sp/pad/view/ro.9VczFLTK07RceJ/rev.410



float px;
float py;
int num_particles = 100;
float jump = 100;
 
void setup() {  
    size(500, 500); 
 
    background(45,18,45);
    
    px = random (width);
    py = random (height);
} 
 
void draw() {
    float npx = constrain (px + random (20, -20), 10, width);
    float npy = constrain (py + random (30, -30), 20, height);
    fill(200,px,50,10);
    rect (px, py, npx, npy);
    
    long last_update = 1000;
    long anim_time = 20;
    long max_anim_time = 1000;
    
    
    fill(28,0,170);
    beginShape(CENTER);
    vertex(45,120);
    vertex(250, 250);
    vertex(125, 85);
    vertex (145, 45);
    
     fill(60,40,9);
    beginShape();
    vertex(300,40);
    vertex(125, 125);
    vertex(990, 40);
    vertex (34, 500);
    
     vertex(20,30);
    vertex(125, 170);
    vertex(80, 20);
    vertex (38, 120);
    
    endShape(CLOSE);
    
    line(255);
    stroke(0);
strokeWeight(30);
    
    
    px = npx;
    py = npy;
    
    
    float npx = constrain (px + random (-70, 10), 0, width);
    float npy = constrain (py + random (-50, 100), 0, height);
    noStroke();
    fill(300,px,100,8);
    ellipse (px, py, npx, npy);
  
}