xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
translate(width/2,height/2);
background(0,5);
noFill();
stroke(255);
let s = map(sin(millis()/1500),-1,1, -150,150);
let c = map(cos(millis()/1500), -1, 1, -150, 150);
//translate(c,s);
//translate(0,s);
rotate(s);
ellipse(100, 0, 60, 200);
ellipse(100, 0, 200, 60);
rotate(40);
ellipse(100, 0, 60, 200);
rotate(-80);
ellipse(100, 0, 60, 200);
ellipseMode(CENTER);
/*
let s1 = map(sin(millis()/1500),-1,1, -150,150);
rotate(s1);
rect(100,100,200,200);
rect(100,100,200,200);
rotate(45);
rect(100,100,200,200);
rotate(-90);
rectMode(CENTER);
*/
}