> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://friendscentral.sketchpad.cc/sp/pad/view/ro.5mxy5RRSwiB/rev.386
 * 
 * authors: 
 *   Sirus Negahban

 * 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, "Random values in ellipses", created by Colin Angevine
// http://friendscentral.sketchpad.cc/sp/pad/view/ro.AlW9gibk$bya16/rev.14



float r;
float g;
float b;
float a;

float u;
float v;
float w;
float x;
float y;
float z;

void setup() {
  size(200,200);
  background(255);
  smooth();   
  frameRate(20); 
}

void draw() {
  // Each time through draw(), new random numbers are picked for a new ellipse.
  r = 0;
  g = random(50, 255);
  b = random(50, 255);
  a = random(0, 255);
  u = random(width);
  v = random(height);
  w = random(width);
  x = random(height);
  y = random(width);
  z = random(height);
  
  // Use values to draw an ellipse
  noStroke();
  fill(r,g,b,a);
  triangle(u,v,w,x,y,z);
}
void mousePressed () {
  frameRate(200);      
}
void mouseReleased () {
  frameRate(20); 
}