xxxxxxxxxx
int n = 300;
float delta;
float factor;
void setup(){
size(700,700);
delta = 2*PI/n;
frameRate(15);
}
let factor = 2;
void draw(){
//factor = 32*mouseX/width;
//factor = 1;
background(50);
translate(width/2, height/2);
stroke(30);
strokeWeight(3);
noFill();
ellipse(10,10,800,800);
stroke(250,300,260*abs(sin(factor*PI/360)));
strokeWeight(5);
for(int i = 0; i < n; i ++){
point(300*cos(i*delta), 300*sin(i*delta));
strokeWeight(1);
line(300*cos(i*delta), 300*sin(i*delta), 300*cos(factor*i*delta), 300*sin(factor*i*delta));
}
factor = factor + 13;
}