> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.lNaJEqv$iBs/rev.346
 * 
 * authors: 
 *   
 *   Rod

 * 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 s = 0;
int[] aa = {10,20,40,10,15};

void setup() {  // this is run once.   
    
    // set the background color
    background(255);
    
    // canvas size (Variable aren't evaluated. Integers only, please.)
    size(300, 300); 
      
    // smooth edges
    smooth();
    
    // limit the number of frames per second
    frameRate(30);
    
    // set the width of the line. 
    strokeWeight(4);
} 

void draw() {  // this is run repeatedly.  

    // set the color
    stroke(random(50), random(255), random(255), 100);
  //background(#ffffff , 1);
   //
    //undraw lines fade

    stroke(#FFFFFF,60);
    for(int t =0; t < s;t++){
    for(int i =0; i < 4;i++){
    line((i*width/4), height- (t/10)*height*aa[i]/50 , (i+1)*width/4,height- (t/10)* height*aa[i+1]/50);
    }}

     stroke(30,100,100,255);
    // draw the line
    for(int i =0; i < 4;i++){
    line((i*width/4), height- (s/10)*height*aa[i]/50 , (i+1)*width/4,height- (s/10)* height*aa[i+1]/50);
    }
    
    if(s<10)s++;
    
    // move over a pixel
   // if (i < width) {
    //      i++;
   // } else {
   //     i = 0; 
   // }
}