Broug p.27 π/8

cordoba

float r= 180;
int fCol = 210;
float theta = PI/8;

void setup(){
  size(600,400);
  noLoop();
}

void draw(){
  background(255);
  translate(300,200);
  stroke(fCol);
  rect(-r,-r,2*r,2*r);
  ellipse(0,0,2*r,2*r);
  
  stroke(fCol);  
  drawSpokes();
  drawFrame();
  
  stroke(0);
  drawPattern();
}

void drawPattern(){
   for(int i=0;i<4;i++){
    rotate(PI/2);
    line(0, tan(theta)*r, -r,tan(theta)*2*r);
    line(0, tan(theta)*r, r,tan(theta)*2*r);
    line(r, 0, cos(PI/4) * tan(theta)*r, sin(PI/4) * tan(theta)*r);
    line(r, 0, cos(PI/4) * tan(theta)*r, -sin(PI/4) * tan(theta)*r);
  }  
}

void drawFrame(){  
  for(int i=0;i<4;i++){
    rotate(PI/2);
    line(r,0,-r,tan(theta)*2*r);
    line(r,0,-r,-tan(theta)*2*r);
  }
}

void drawSpokes(){
  line(-r,0,r,0);
  line(0,r,0,-r);
  line(0,0,-r,r);
  line(0,0,r,r);
  line(0,0,r,-r);
  line(0,0,-r,-r);
}

WLS:ISL

Fu

int bW = 140;
int bT = 12;
int h = bW/4;
int[] hex={0,0,0,0,0,1};
int o=20;

void setup() {
   size(180,160);
   stroke(0);
   strokeWeight(bT);
   strokeCap(SQUARE);
   noLoop();
}

void draw() {
   background(255);
   for (int i=0; i<hex.length; i++){
      int yOff = o + (i*bT*2);
      if(hex[i]==0){
         line(o,yOff,o+(bW/2)-h/2,yOff);
         line(o+(bW/2)+h/2,yOff,o+bW,yOff);
      }else{
         line(o,yOff,o+bW,yOff);
      }
   }
}