function setup() {
createCanvas(600,600);
background(255);
}
function draw() {
for(var y=50;y<height;y+=100){
for(var x=50;x<=width;x+=100){
fill(40,40,154);
ellipse(x,y,100,100);
}
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>