xxxxxxxxxx
let M=20
function setup() {
createCanvas(windowWidth, windowHeight);
rectMode(CENTER);
background(255);
for(let i=1; i<M;i++){
greca(random(width),random(height),random(PI/2),random(1),20)
}
}
function draw() {
}
function greca(x,y,angolo,scala){
push();
translate(x,y);
rotate(angolo);
scale(scala);
for(let i=1;i<=M;i++){
strokeWeight(3);
stroke(0);
fill(map(i,1,M,0,255),0,0,100);
rect(0,0,map(i,1,M,500,0));
}
pop();
}