> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.v-1xJrJvxsL/rev.5
 * 
 * authors: 
 *   Path To Sanity
 *   (Unnamed author)

 * 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, "Untitled Sketch", created by 2011_04_18-George_Keratzakis
// http://sketchpad.cc/sp/pad/view/ro.8nGjRRDRSXv/rev.3



int rad=10;
float point_level_1, point_level_2, point_level_3;

void setup () {
  size (400, 400);
  smooth ();
}

void draw () {
  background (255);
  noFill ();  

  //1
  point_level_1=map(mouseX, 0, width, 25, 50);
  fill (44, 215, 230, 255);

  curveTightness (map(mouseY, 0, height, 20, -5));
  beginShape ();
  curveVertex (width/2-point_level_1, height/2+point_level_1);
  curveVertex (width/2+point_level_1, height/2+point_level_1);
  curveVertex (width/2+point_level_1, height/2-point_level_1);
  curveVertex (width/2-point_level_1, height/2-point_level_1);
  curveVertex (width/2-point_level_1, height/2+point_level_1);
  curveVertex (width/2+point_level_1, height/2+point_level_1);
  curveVertex (width/2+point_level_1, height/2-point_level_1);
  endShape ();

  //2
  point_level_2=map(mouseY, 0, height, 30, 60);
  fill (255, 59, 142, 200);

  curveTightness (map(mouseX, 0, width, -7, 25));
  beginShape ();
  curveVertex (width/2-point_level_2, height/2+point_level_2);
  curveVertex (width/2+point_level_2, height/2+point_level_2);
  curveVertex (width/2+point_level_2, height/2-point_level_2);
  curveVertex (width/2-point_level_2, height/2-point_level_2);
  curveVertex (width/2-point_level_2, height/2+point_level_2);
  curveVertex (width/2+point_level_2, height/2+point_level_2);
  curveVertex (width/2+point_level_2, height/2-point_level_2);
  endShape ();

  //3
  point_level_3=map(mouseY, 0, height, -60, -10);
  fill (0, 0, 0, 20);

  curveTightness (map(mouseY, 0, height, -5, 20) );
  beginShape ();
  curveVertex (width/2-point_level_3, height/2+point_level_3);
  curveVertex (width/2+point_level_3, height/2+point_level_3);
  curveVertex (width/2+point_level_3, height/2-point_level_3);
  curveVertex (width/2-point_level_3, height/2-point_level_3);
  curveVertex (width/2-point_level_3, height/2+point_level_3);
  curveVertex (width/2+point_level_3, height/2+point_level_3);
  curveVertex (width/2+point_level_3, height/2-point_level_3);
  endShape ();
}