> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://codigodelaimagen.sketchpad.cc/sp/pad/view/ro.IUQud1kjnMF/rev.34
 * 
 * authors: 
 *   pequenoestudio

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



void setup() {  // inicialización
    background(0);
    
    size(500, 500); 
} 

void setup() {
  //largeur, hauteur du sketch
  size(800, 600);
  //couleur de fon du sketch
  background(0);
  //antialiasing des lignes
  smooth();
  //frameRate(10);
}
float Mspeed;
 
void draw() {
  Mspeed=abs(mouseX-pmouseX);
  println(Mspeed);
  noStroke();
  float taille_ellipse=Mspeed;
 // color ellipse_color = color(random(255,0,100), random(255,0,100), random(255,0));
  color ellipse_color = color(150+random(0,100), random(0,21), random(0,21));
   // color ellipse_color = color(150+Mspeed*10, Mspeed*20, Mspeed*10 );
  fill(ellipse_color);
  ellipse(mouseX+random(-20,20),mouseY+random(-20,20), taille_ellipse,taille_ellipse);
  if (mousePressed == true) {
    strokeWeight(0.1+Mspeed/20);
    stroke(255, 50);
    strokeWeight(0.1+Mspeed/20);
    line(mouseX, mouseY, width, mouseX); 
    line(mouseX, mouseY, 255, mouseX); 
    stroke(255);
    strokeWeight(0.5+Mspeed/20);
    line(pmouseX, pmouseY, mouseX, mouseY);
  }
  //fermeture de draw
  if (keyPressed == true) {
    //saveFrame(); 
    background(255);
  }
}
 
void mouseMoved() {

}