xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
translate(width/2,height/2);
background(0,20);
noFill();
stroke(255);
let s = map(sin(millis()/5000),-1,1, -150,150);
let c = map(cos(millis()/5000), -1, 1, -150, 150);
translate(s,-c)
rotate(s);
rect(0,0,100,100);
rect(0,150,200,200);
rectMode(CENTER);
}