/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.AFknty56i1f/rev.200
*
* authors:
* jaruz
* 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:fondos2", created by jaruz
// http://studio.sketchpad.cc/sp/pad/view/ro.9jj3rkAq-Wmtv/rev.20
// This sketch builds on a prior work, "random:fondos", created by jaruz
// http://studio.sketchpad.cc/sp/pad/view/ro.9q0SVIWGJFN9o/rev.146
background(255);
size(300, 600);
smooth();
noStroke();
int numeroFormas=1000;
int maximoAncho=50;
int maximoAlto=50;
color azul=color(0,0,255,50);
color rojo=color(255, 0, 0,50);
color verde=color(0,255, 0, 50);
for(int i=0; i<numeroFormas; i++){
float azar=random(10);
if(azar>6){
fill(azul);
}else if(azar>2){
fill(rojo)
}else{
fill(verde);
}
rect(random(width-maximoAncho), random(height-maximoAlto), random(maximoAncho), random(maximoAlto));
}