xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
ellipseMode(CENTER);
}
function draw() {
let b = map(sin(millis()/50), -1, 1, 0, 255);
background(100, 2);
// jump to the center of the sketch
translate(width/2, height/2);
// mapping of sin over time (-1 ... +1) to -200 ... 200
// speed is defined by /1000
let x = map(sin(millis()/1500), -1, 1, -200, 200);
let y = map(cos(millis()/1500), -1, 1, -200, 200);
let h = map(sin(millis()/1500), -1, 1, -100, 100);
let f = map(sin(millis()/50), -1, 1, 255, 0);
noFill();
stroke(f);
translate(x, y);
ellipse(0, 0, 200, 200);
/*
Anwendungsbereiche:
Position (x, y)
Rotation (Winkel)
Grösse / Skalierung (Breite / Höhe)
Rundungen rect
Farbe, Deckkraft
Outline / strokeWeight
-> Geschwindigkeit
*/
}