IFD:All Hail The Pixels/Patterns: Difference between revisions

From Medien Wiki
Line 4: Line 4:


Please paste your images and processing sketches below:
Please paste your images and processing sketches below:
==EMIR GENC==
* Pattern Hexagon
[[File:Hexagonpattern_emir genc.png]]
void setup(){
size(500,500);
background(255);
}
void draw(){
 
  for(int x=0; x<500; x+=60+60*sin(PI/6)){
  for(int y=0; y<500; y+=60*cos(PI/6)){
 
  drawHexagon(x, y, 30);
  drawHexagon(x+30+30*sin(PI/6), y+30*cos(PI/6), 30);
  }
}
}
void drawHexagon(float x, float y, float radius) {
  pushMatrix();
  translate(x, y);
  beginShape();
  for (int i = 0; i < 6; i++) {
    pushMatrix();
    float angle = PI*i/3;
    vertex(cos(angle) * radius, sin(angle) * radius);
    popMatrix();
  }
  endShape(CLOSE);
  popMatrix();
}


== Rubab Paracha ==
== Rubab Paracha ==