-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphpaper.pde
67 lines (54 loc) · 1.73 KB
/
graphpaper.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import processing.pdf.*;
int rowleft = 0; //start first line
int rowright = 15; //start end of first line
int oldleft = 0;
int oldright = 0;
int vertspace = 30;
int randrange = 6;
int rows = 80;
int columns = 22;
int columnspace = 30;
int columnleft = 0;
int columnright = 30;
void setup() {
size(1260, 1782);
background(255);
//strokeWeight(20);
}
void draw() {
beginRecord( PDF, "pdf/isographglitch-####.pdf" ); //where to save your file
for (int i = 0; i < rows; i++) {
stroke(0);
line(columnleft, rowleft, columnright, rowright);
line(columnleft,0,columnleft,height);
line(columnright,0,columnright,height);
for (int x = 0; x < columns; x++){
columnleft = columnleft+columnspace;
columnright = columnright+columnspace;
line(columnleft, rowright, columnright, rowleft);
columnleft = columnleft+columnspace;
columnright = columnright+columnspace;
line(columnleft, rowleft, columnright, rowright);
line(columnleft,0,columnleft,height);
line(columnright,0,columnright,height);
}
columnleft = 0;
columnright = 30;
oldright = rowright;
rowleft = rowleft + vertspace + int(random(-randrange,randrange));
rowright = rowright + vertspace + int(random(-randrange,randrange));
line(columnright, oldright, columnleft, rowleft);
for (int x = 0; x < columns; x++){
columnleft = columnleft+columnspace;
columnright = columnright+columnspace;
line(columnleft, oldright, columnright, rowleft);
columnleft = columnleft+columnspace;
columnright = columnright+columnspace;
line(columnleft,rowleft,columnright,oldright);
}
columnleft = 0;
columnright = 30;
}
endRecord();
exit();
}