xxxxxxxxxx
let w = 120;
let h = 50;
let w2 = 50;
let h2 = 50;
let wp = 30;
let hp = 30;
function setup() {
createCanvas(874, 620);
background(255);
rectMode(CENTER);
}
function draw() {
background(50);
//for (let y=1; y<5; y++)
{
for (let x=1; x<6; x++)
{
ellipse(x*150, height/2, w, h);
//for (let x=1; x<6; x++)
//for (let y=1; y<6; y++)
//fill(y*40,y*40,y*40)
ellipse(x*150, height/2, w2, h2,);
//fill (255, 255, 255)
} }
//for(let y=1; y<5; y++)
for (let i=1; i<6; i++) {
push();
let a = map(i, 0, 5, PI);
//translate(i*150, 0);
fill(0,0,0)
scale(a);
ellipse(i*150, height/2, wp*i/5, hp*i/5);
pop();
}
/*
rect(125, height/2, w, h);
rect(200, height/2, w, h);
rect(275, height/2, w, h);
rect(350, height/2, w, h);
rect(425, height/2, w, h);
rect(500, height/2, w, h);
rect(575, height/2, w, h);
rect(650, height/2, w, h);
rect(725, height/2, w, h);
rect(800, height/2, w, h);
*/
}