void setup(){
size(500, 500);
frameRate(30);
smooth();
}
void draw(){
background(255);
fill(220, 20, 60);
noStroke();
float posRad = frameCount * 0.3;
float posR = 100;
translate(width / 2 + posR * cos(posRad), height / 2 + posR * sin(posRad));
rotate(frameCount * 0.07);
float angWidth = 6.5;
float angInterval = 0.7;
float angle = 0.0;
while(angle < 360){
float innerR = 100;
float outerR = 1000;
beginShape();
for(float a = angle; a <= angle + angWidth; a += 0.5){
vertex(innerR * cos(radians(a)), innerR * sin(radians(a)));
}
for(float a = angle + angWidth; a >= angle; a -= 0.5){
vertex(outerR * cos(radians(a)), outerR * sin(radians(a)));
}
angle += angWidth + angInterval;
endShape(CLOSE);
}
}