Skip to content

Instantly share code, notes, and snippets.

@fiskurgit
Created May 3, 2016 10:33
Show Gist options
  • Select an option

  • Save fiskurgit/0a46e425dad4d7a438f3c2dc39063619 to your computer and use it in GitHub Desktop.

Select an option

Save fiskurgit/0a46e425dad4d7a438f3c2dc39063619 to your computer and use it in GitHub Desktop.
3 Double Grids 0°, 30°, 60° by Francois Morellet rendered by processing.
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