toy twinckle
@author
int rectNum = 43;
float rectSize = 10;
color[] colors = {
color(229, 10, 132),
color(84, 195, 241),
color(240, 235, 69),
color(156, 202, 84),
color(237, 109, 31),
color(229, 10, 132),
color(124, 80, 157),
};
void setup(){
size(500, 500);
frameRate(20);
noStroke();
}
void draw(){
background(229, 10, 132);
translate(width / 2, height / 2);
translate(-rectNum * rectSize / 2, -rectNum * rectSize / 2);
for(int x = 0; x <rectNum; x++){
for(int y = 0; y < rectNum; y++){
int ci;
fill(colors[(x * y + frameCount) % 7]);
rect(x * rectSize, y * rectSize, rectSize, rectSize);
}
}
}