xxxxxxxxxx
function setup() {
createCanvas(559, 397, SVG);
//background(0);
rectMode(CENTER);
clear();
}
function draw() {
// 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 s = map(sin(millis()/500), -6, 6, -200, 200);
let c = map(cos(millis()/500), -6, 6, -200, 200);
//fill(c2,10);
stroke(255);
noFill();
stroke(0);
translate(s,c);
rotate(millis()/4000);
rect(0, 0, -100, 300);
}
function mousePressed(){
save("mySVG.svg");
}