/
Brushes.pde
91 lines (80 loc) · 2.91 KB
/
Brushes.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
void brush1(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth);
ellipse(x,y,px,py);
return;
}
void brush2(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth);
pushMatrix();
translate(x,y);
rotate(random(px));
rect(0+random(50),0+random(50),10,10);
popMatrix();
return;
}
void brush3(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth);
pushMatrix();
translate(x,y);
rotate(random(px));
line(0+random(50),0+random(50),0,0);
rotate(random(px));
line(0+random(50),0+random(50),0,0);
rotate(random(px));
line(0+random(50),0+random(50),0,0);
popMatrix();
return;
}
void brush4(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth);
line(px,py,x,y);
line(px,py,x,y);
line(width/2+((width/2)-px),py,width/2+((width/2)-x),y);
line(px,height/2+((height/2)-py),x,height/2+((height/2)-y));
line(width/2+((width/2)-px),height/2+((height/2)-py),width/2+((width/2)-x),height/2+((height/2)-y));
return;
}
void brush5(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth);
line(px,py,x,y);
line(width/2+((width/2)-px),py,width/2+((width/2)-x),y);
line(px,height/2+((height/2)-py),x,height/2+((height/2)-y));
line(width/2+((width/2)-px),height/2+((height/2)-py),width/2+((width/2)-x),height/2+((height/2)-y));
line(width/2+((width/2)-py),width/2-((width/2)-px),width/2+((width/2)-y),width/2-((width/2)-x));
line(height/2-((height/2)-py),width/2-((width/2)-px),height/2-((height/2)-y),width/2-((width/2)-x));
line(width/2+((width/2)-py),height/2+((height/2)-px),width/2+((width/2)-y),height/2+((height/2)-x));
line(width/2-((width/2)-py),height/2+((height/2)-px),width/2-((width/2)-y),height/2+((height/2)-x));
return;
}
void brush6(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth);
px=px+random(50);
py=py+random(50);
ellipse(x,y,px,py);
ellipse(width/2+((width/2)-x),y,px,py);
ellipse(x,height/2+((height/2)-y),px,py);
ellipse(width/2+((width/2)-x),height/2+((height/2)-y),px,py);
ellipse(width/2+((width/2)-y),width/2-((width/2)-x),px,py);
ellipse(height/2-((height/2)-y),width/2-((width/2)-x),px,py);
ellipse(width/2+((width/2)-y),height/2+((height/2)-x),px,py);
ellipse(width/2-((width/2)-y),height/2+((height/2)-x),px,py);
return;
}
void brush7(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth);
line(px,py,x,y);
line(width/2+((width/2)-px),py,width/2+((width/2)-x),y);
return;
}
void brush8(int x,int y, int px, int py, int lineWidth) {
strokeWeight(lineWidth * 1);
px=px+random(90);
py=py+random(180);
x=x+random(180);
y=y+random(90);
line(px,py,x,y);
line(width/2+((width/2)-px),py,width/2+((width/2)-x),y);
line(width/2+((width/2)-px),height/2+((height/2)-py),width/2+((width/2)-x),height/2+((height/2)-y));
line(width/2+((width/2)-py),width/2-((width/2)-px),width/2+((width/2)-y),width/2-((width/2)-x));
return;
}