Skip to content

Instantly share code, notes, and snippets.

@fiskurgit
Created May 3, 2016 11:47
Show Gist options
  • Save fiskurgit/52649c52c77a5e411d65e258448939d3 to your computer and use it in GitHub Desktop.
Save fiskurgit/52649c52c77a5e411d65e258448939d3 to your computer and use it in GitHub Desktop.
float spacer = 60;
void setup(){
size(640, 640);
noLoop();
stroke(0, 30);
}
void draw(){
background(220);
for(int i = 0 ; i < 55 ; i++){
drawAngleGrid(i * 6);
}
}
void drawAngleGrid(float offset){
pushMatrix();
translate(width/2, height/2);
rotate(radians(offset));
for(float x = -width ; x < width*2 ; x += spacer){
line(x + random(-1.5, 1.5), -height, x + random(-1.5, 1.5), height*2);
}
for(float y = -height ; y < height*2 ; y += spacer){
line(-width, y + random(-0.5, 0.5), width*2, y + random(-0.5, 0.5));
}
popMatrix();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment