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, y*120, 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, y*120, w2, h2,);
fill (255, 255, 255)
} }
for(let y=1; y<5; y++)
for (let i=1; i<6; i++) {
push();
fill(0,0,0)
ellipse(i*150, y*120, sqrt((i*150-mouseX) ^2+(y*120-mouseY) ^2)*wp/10,sqrt((i*150-mouseX) ^2+(y*120-mouseY) ^2)*wp/10)
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);
*/
}