color rotars
int X =10;
int Y = 10;
float step = 50;
void setup(){
size(500, 500);
colorMode(HSB, 360, 100, 100);
noStroke();
fill(0);
}
void draw(){
background(0, 0, 100);
for(int x = 0; x <= X; x++){
for(int y = 0; y <=Y; y++){
pushMatrix();
translate(x * step, y * step);
color[] colors = {color(30, 100, 100),
color(120, 100, 100),
color(210, 100, 100),
color(300, 100, 100)};
for(int i = 0; i < 4; i++){
fill(colors[i], 200);
if((x + y) % 2 == 0){
ellipse(step / 2 * cos(frameCount * 0.01 + HALF_PI * i), step / 2 * sin(frameCount * 0.01 + HALF_PI * i), 15, 15);
}else {
ellipse(step / 2 * cos(-frameCount * 0.01 + HALF_PI * i), step / 2 * sin(-frameCount * 0.01 + HALF_PI * i), 15, 15);
}
}
popMatrix();
}
}
}