T.ISL, Geonames + DBPedia

Islands of Wales

PREFIX geo-pos: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX geo-ont: <http://www.geonames.org/ontology#>
PREFIX omgeo: <http://www.ontotext.com/owlim/geo#>
SELECT ?name ?link
WHERE {
  ?link geo-ont:name ?name .  
  ?link geo-ont:featureCode geo-ont:T.ISL .
  ?link geo-ont:parentADM1 dbpedia:Wales .
}

Broug p.27 i=7 j=4

cordoba-i7j4


void drawPattern(){
   lines[1] = new PLine(0,tan(PI/8)*r,-r,tan(PI/8)*2*r);
   lines[2] = new PLine(r,0,cos(PI/4) * tan(PI/8)*r, sin(PI/4)*tan(PI/8)*r);

   lines[1].spin4MirrorDiag();
   lines[2].spin4MirrorDiag();

}

void createFrame(){
   lines[0] = new PLine(r,0,-r,tan(PI/8)*2*r);
}

void drawFrame(){
   lines[0].spin4MirrorDiag();
}

Broug p.30 i=7 j=4

kairouan-i7-j4

float r= 43;
int fCol = 240;

PLine[] lines;

void setup(){
  size(620,400);
  hint(ENABLE_STROKE_PURE);

  lines = new PLine[8];

  for(int i=0; i<lines.length; i++){
    lines[i] = new PLine();
  }
  background(255);
}

void draw(){
  stroke(fCol);
  translate(-r+10,r+10);

  createFrame();

 for(int j=0; j<4;j++){
    detranslate();
    translate(0,2*j*r);
    for(int i=0; i<7;i++){
      translate(2*r,0);
      stroke(210);
      strokeWeight(0.4);
      drawAxes();
      drawSpokes();
      drawFrame();
      stroke(0);  
      strokeWeight(1);    
      drawPattern(); 
    }

  }
}

void detranslate(){
   resetMatrix();
   translate(-r+10,r+10);   
}

void drawPattern(){
  Point a = lines[0].intersect(lines[3],false);
  Point b = lines[0].intersect(lines[2], false);
  Point c = lines[2].intersect(lines[3].getMirrorX(),false);
  Point d = lines[2].intersect(lines[3].getRotate90(),false);

  lines[4] = new PLine(0,r,a.x,a.y);
  lines[5] = new PLine(b.x,b.y,lines[0].x2,lines[0].y2);
  lines[6] = new PLine(-a.x,a.y,c.x,c.y); 
  lines[7] = new PLine(b.x,b.y,d.x,d.y);

  lines[4].spin4MirrorX();
  lines[5].spin4MirrorDiag();
  lines[6].spin4MirrorX();
  lines[7].spin4MirrorDiag();

}
 Continue reading 

Broug p.30

kairouan

float r= 180;
int fCol = 210;

PLine[] lines;

void setup(){
  size(620,400);
  hint(ENABLE_STROKE_PURE);

  lines = new PLine[8];

  for(int i=0; i<lines.length; i++){
    lines[i] = new PLine();
  }
  background(255);
}

void draw(){
  stroke(fCol);
  translate(300,200);
  strokeWeight(1);    

  rect(-r,-r,2*r,2*r);
  ellipse(0,0,2*r,2*r);
  createFrame();
  stroke(fCol);
  drawAxes();
  drawSpokes();
  drawFrame();
  stroke(0);  
  drawPattern(); 

}

void detranslate(){
   resetMatrix();
   translate(-r+10,r+10);   
}

void drawPattern(){
  Point a = lines[0].intersect(lines[3],false);
  Point b = lines[0].intersect(lines[2], false);
  Point c = lines[2].intersect(lines[3].getMirrorX(),false);
  Point d = lines[2].intersect(lines[3].getRotate90(),false);

  lines[4] = new PLine(0,r,a.x,a.y);
  lines[5] = new PLine(b.x,b.y,lines[0].x2,lines[0].y2);
  lines[6] = new PLine(-a.x,a.y,c.x,c.y); 
  lines[7] = new PLine(b.x,b.y,d.x,d.y);

  lines[4].spin4MirrorX();
  lines[5].spin4MirrorDiag();
  lines[6].spin4MirrorX();
  lines[7].spin4MirrorDiag();

}

void createFrame(){
  float iSq = cos(PI/4)*r;
  float d = r - tan(PI/8)*r;

  lines[0] = new PLine(0,r,-r,r-tan(PI/8)*r);
  lines[1] = new PLine(-iSq,iSq,iSq,iSq);  
  lines[2] = new PLine(-d,r,r,-d); 

  Point a = lines[1].intersect(lines[2], false);
  lines[3] = new PLine(a.x,r,a.x,-r);
}

void drawFrame(){  
  lines[0].spin4MirrorX();
  rotate(PI/2);
  lines[1].spin4MirrorY();
  rotate(PI/4);
  lines[1].spin4MirrorY();
  rotate(-PI/4);  
  lines[2].spin4MirrorDiag();
  lines[3].spin4MirrorX(); 
  rotate(-PI/2);
}

void drawAxes(){
  PLine axes = new PLine(-r,0,r,0);
  axes.spin4();
}

void drawSpokes(){
  PLine spoke=  new PLine(0,0,r,r);
  spoke.spin4();
}

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