// 2nd tweak of sixBySix
// sin(), cos(), rotate(), cube, hexagon, tessellation
Hex h;
void setup() {
size(600, 600);
h = new Hex();
noFill();
stroke(255);
strokeWeight(1);
strokeCap(ROUND);
}
void draw() {
background(0);
h.display();
}
class Hex {
float ang, ang2;
void display() {
translate(width/2, height/2);
ang2 += .01;
for (int j= 0; j < 6; j++) {
ang = j * radians(60);
pushMatrix();
rotate(ang);
translate(-55, 0);
rotate(ang2);
beginShape();
fill(#0A2BA7);
vertex(55, -14.7);
vertex(110, -110);
vertex(0, -110);
vertex(-55, -14.7);
endShape(CLOSE);
beginShape();
fill(#0811FC);
vertex(0, -110);
vertex(-55, -14.7);
vertex(-110, -110);
vertex(-55, -205.3);
endShape(CLOSE);
beginShape();
fill(#088CFC);
vertex(-55, -205.3);
vertex(-0, -110);
vertex(110, -110);
vertex(55, -205.3);
endShape(CLOSE);
popMatrix();
}
}
}