Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement