> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://codigodelaimagen.sketchpad.cc/sp/pad/view/ro.kPzk-apm2BK/rev.615
 * 
 * authors: 
 *   emilio gonzález villegas

 * 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, "loops", created by Juan Antonio Ruz
// http://codigodelaimagen.sketchpad.cc/sp/pad/view/ro.BcniaXO3coIBG/rev.58


void setup() {  // inicialización
    background(255);
    
    size(300, 300); 
    // este es el comportamiento por defecto loop();
    frameRate(3);
    //noLoop();
} 

void draw() {  // redibujado   

   //mientras se cumpla una condición (boolean)repite el proceso o codigo entre llaves
   
   
   background(255);
   
  int contador=0;
  int limite=100;

    float puntoAnteriorX=0;
    float puntoAnteriorY=0;
  
   while(contador<limite){
       strokeWeight(random(2));
       stroke(random(255),100);

        float puntoX=random(300);
        float puntoY=random(300);
       point(puntoX,puntoY);
       ellipse(puntoX,puntoY,random(10),random(10));
       line(puntoX,puntoY,puntoAnteriorX,puntoAnteriorY);
       contador=contador+1;
       puntoAnteriorX=puntoX;
       puntoAnteriorY=puntoY;
       
       }
       }