float angle = 0, radius = 300;
int num = 6;
void setup() {
size(800, 800);
fill(255);
}
void draw() {
fill(0, 20);
rect(-50, -50, width+100, height+100);
translate(width/2, height/2);
rotate(angle);
if (mousePressed) {
angle = angle + -0.05;
radius = radius * 0.975;
} else {
radius = radius + (300 - radius) * 0.05;
}
for (int i=0; i< 8; i++) {
fill(#214EFC);
ellipse(100cos(iTWO_PI / 8), 100sin(iTWO_PI/ 8), 50, 50);
}
for (int i=0; i< 8; i++) {
fill(#19F5E8);
ellipse(300cos(iTWO_PI / 8), 300sin(iTWO_PI / 8), 150, 150);
}
}
I would like to ask how to make the outer ring rotate in the opposite direction.