xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
rectMode(CENTER);
}
function draw() {
//background(0);
// jump to the center of the sketch
translate(width/2, height/2);
noFill();
stroke(0);
let e = map(sin(millis()/1000), -1, 1, 0, 595);
let b = map(sin(millis()/1000), -1, 1, 0, 395);
ellipse(0, 0, e, b);
// mapping of sin over time (-1 ... +1) to -200 ... 200
// speed is defined by /1000
let s = map(sin(millis()/1500), -1, 1, -200, 200);
let sc = map(cos(millis()/1500), -1, 1, -100, 100);
// mappingf sin over time to an angle 0-PI
let r = map(sin(millis()/5500), -1, 1, 0, PI);
let c = map(sin(millis()/1000), -1, 1, 0, 50);
let w = map(sin(millis()/1000), -1, 1, 100, 250);
noFill();
stroke(255); //, c);
translate(s, sc);
//rotate(r);
//strokeWeight(c);
//rect(0, 0, w, w);
ellipse(0, 0, 200, 200);
}