xxxxxxxxxx
18
function setup() {
createCanvas(400, 400);
frameRate(15);
}
function draw() {
background(0);
let size = [width/4, height/4];
let elSz = [10,10];
let dotCount = 6;
for (let i=0; i<dotCount; i++) {
let x = (Math.sin(i * dotCount / Math.PI))*size[0]+(width/2);
let y = (Math.cos(i * dotCount / Math.PI))*size[1]+(height/2);
let lum = (((i+frameCount)%dotCount)*250)/dotCount;
fill(lum)
ellipse(x, y, 55, 55);
}
}