xxxxxxxxxx
30
function setup() {
createCanvas(1080, 1080);
angleMode(DEGREES);
colorMode(HSB, 360);
angle = 0;
radius = 100;
}
function draw() {
background(0, 10);
translate(width/2, height/2);
rotate(angle);
fill(200, 300, 360);
ellipse(8*radius*cos(frameCount)*pow(sin(frameCount), 2), 4*radius*cos(2*frameCount)*sin(frameCount), radius);
fill(250, 360, 360);
ellipse(8*radius*cos(frameCount+180)*pow(sin(frameCount+180), 2)-radius, 4*radius*cos(2*frameCount+180)*sin(frameCount), radius);
fill(200, 300, 360);
ellipse(8*radius*cos(frameCount+180)*pow(sin(frameCount+180), 2)+radius, 4*radius*cos(2*frameCount+180)*sin(frameCount), radius);
fill(250, 360, 360);
ellipse(8*radius*cos(frameCount)*pow(sin(frameCount), 2)+2*radius, 4*radius *cos(2*frameCount)*sin(frameCount), radius);
angle++;
}