Created
May 3, 2016 10:33
-
-
Save fiskurgit/0a46e425dad4d7a438f3c2dc39063619 to your computer and use it in GitHub Desktop.
3 Double Grids 0°, 30°, 60° by Francois Morellet rendered by processing.
This file contains hidden or 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 = 20; | |
| void setup(){ | |
| size(640, 640); | |
| noLoop(); | |
| stroke(30, 80); | |
| } | |
| void draw(){ | |
| background(220); | |
| drawAngleGrid(0.0 + random(-1, 1)); | |
| drawAngleGrid(30.0 + random(-1, 1)); | |
| drawAngleGrid(60.0 + random(-1, 1)); | |
| } | |
| void drawAngleGrid(float offset){ | |
| pushMatrix(); | |
| rotate(radians(offset)); | |
| for(float x = -width ; x < width*2 ; x += spacer){ | |
| line(x, -height, x, height*2); | |
| } | |
| for(float y = -height ; y < height*2 ; y += spacer){ | |
| line(-width, y, width*2, y); | |
| } | |
| popMatrix(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment