xxxxxxxxxx
let cols = 21;
let rows = 10;
var cellW, cellH;
var colors = ["#65F0B6","#F0664D", "#F0DF59", "#4DF0AC", "#937DF0"];
function setup() {
createCanvas(windowWidth, windowHeight);
cellW = width/cols;
cellH = height/rows;
background("#44396E");
noLoop();
noStroke();
}
function draw() {
for(var i=0; i<cols; i++){
//stroke(0);
//strokeWeight(0.1);
//line(i*cellW, 0, i*cellW, height);
for(var j=0; j<rows; j++){
//stroke(0);
//strokeWeight(0.1);
//line(0, j*cellH, width, j*cellH);
//noStroke();
let c= color(random(colors));
let r = random(cellH);
fill(c);
ellipse(i*cellW + cellW/2, j*cellH + cellH/2, r, r);
let chance = random(3);
if(chance < 1){
c= color(random(colors));
r = random(r);
fill(c);
ellipse(i*cellW + cellW/2, j*cellH + cellH/2, r, r);
}
}
}
//save("mySVG.svg");
}