xxxxxxxxxx
void setup() {
size(500, 500);
strokeWeight(15);
strokeJoin(SQUARE);
frameRate(25);
}
void draw() {
float angle = tan(radians(frameCount));
float c = abs(cos(radians(frameCount)));
float s = abs(sin(radians(frameCount)));
fill((c-s)*255, c*255, s*255);
background(c+s*255, c*255, s*255);
stroke(255);
for (int i = -360; i <= 360; i+=180) {
for (int q = -360; q <= 360; q+=180) {
pushMatrix();
translate(width/2+i/1.5, height/2+q/1.1);
rotate(radians(i+q+90+angle*90));
scale(abs(angle));
beginShape();
vertex(0, -40);
vertex(-50, 50);
vertex(50, 50);
endShape(CLOSE);
popMatrix();
}
}
}