xxxxxxxxxx
23
let r = 150;
let theta = 90;
function setup() {
createCanvas(400, 400);
fill(255);
textAlign(CENTER);
textSize(18);
}
function draw() {
background(185, 20, 222);
translate(width / 2, height / 2);
let x = r * cos(theta);
let y = r * sin(theta);
theta += 0.01;
stroke(255);
line(0, 0, x, y);
noStroke();
text("let's spin!", x, y);
}