xxxxxxxxxx
25
let r = 0.99;
let n = 100;
let m = 1.25;
function setup() {
createCanvas(800, 800);
background(255);
ellipse(width/2,width/2,width*r,width*r);
}
function draw() {
if (frameCount<(n*4)){
stroke(0,255);
strokeWeight(0.5);
} else {
stroke(0,0);
strokeWeight(1.0);
}
translate(width/2,height/2);
let x1 = r*width/2*cos(frameCount/n*2*PI);
let y1 = r*width/2*sin(frameCount/n*2*PI);
let x2 = r*width/2*cos((frameCount*m)/n*2*PI);
let y2 = r*width/2*sin((frameCount*m)/n*2*PI);
line(x1,y1,x2,y2);
}