Created
May 3, 2016 11:47
-
-
Save fiskurgit/52649c52c77a5e411d65e258448939d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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