xxxxxxxxxx
43
i = 0;
x1 = 400;
y1= 200;
function setup() {
createCanvas(800, 800);
background(240);
r = random(10,100);
stroke(0,100);
let shades = ["#D95527", "#A9CECE", "#D5E3E3", "#E9D6A5", "#FCF3D2", "#FFE1D7"];
let shade = random(shades);
cS = color(shade);
fill(cS);
}
function draw() {
translate(width / 2, height / 2);
var radius = 400;
var angle = TAU / r;
var x = cos(angle * i) * 20;
var y = cos(angle * i) * 200;
i = i + 0.1;
ellipse(x1, y1, x, y);
x1 = x1 - 2;
if (x1 < -450) {
x1=400;
y1=y1-40;
let shades = ["#D95527", "#A9CECE", "#D5E3E3", "#E9D6A5", "#FCF3D2", "#FFE1D7"];
let shade = random(shades);
cS = color(shade);
fill(cS,10);
r = random(20,100);
}
}