-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgridDraw2.pde
More file actions
48 lines (41 loc) · 968 Bytes
/
gridDraw2.pde
File metadata and controls
48 lines (41 loc) · 968 Bytes
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
void gridDraw2() {
fill(gridFill2);
strokeWeight(lineWeight2);
stroke(gridlineStroke2);
for (int yLoc = 0; yLoc < z2.length; yLoc++) {
for (int xLoc = 0; xLoc < z2.length; xLoc++) {
beginShape(QUADS);
x2 = xLoc;
y2 = yLoc;
vertex(x2*spacing2, y2*spacing2, zMap2()); //0,0
y2++;
if (y2 == dataPoints2) {
yBound2();
endShape();
beginShape(QUADS);
}
vertex(x2*spacing2, y2*spacing2, zMap2()); //0,1
x2++;
if (x2 == dataPoints2) {
xBound2();
endShape();
beginShape(QUADS);
}
vertex(x2*spacing2, y2*spacing2, zMap2()); //1,1
y2--;
if (y2 < 0) {
yBound2();
endShape();
beginShape(QUADS);
}
vertex(x2*spacing2, y2*spacing2, zMap2()); //1,0
x2--;
if (x2 < 0) {
xBound2();
endShape();
beginShape(QUADS);
}
vertex(x2*spacing2, y2*spacing2, zMap2()); //0,0
endShape();
}}
}