-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpower_v1.pde
151 lines (124 loc) · 3.09 KB
/
power_v1.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//////////////////////////////////////////////////
/*
Firework animation is from Spiral Fireworks 1 by shikaimonjo technology(Masahiro Yoshida)
The poem is "Power" by Adrienne Rich. The coding of the text animation by purplekimchi (Kim Knight)
*/
float a, b, c, d;
float x1 = 0;
float x2 = 0;
float y1 = 0;
float y2 = 0;
float gt = 1;
float gr = ((1 + sqrt(5)) / 2);
int poem = 0;
void setup(){
size(1280, 720);
background(255, 131, 250);
noStroke();
frameRate(30);
//fs = new FullScreen(this);
//fs.enter();
noCursor();
}
void mouseClicked() {
poem++;
println(poem);
}
void draw(){
textSize(32);
float w = width/2;
float h = height/2;
//float _cos = cos(millis() / 5000.f);
//float _sin = sin(millis() / 5000.f);
//float _cos = cos(millis() / 3000.f);
//float _sin = sin(millis() / 3000.f);
float _cos = cos(millis() / 1000.f);
float _sin = sin(millis() / 1000.f);
//float _cos = cos(millis() / 100.f);
//float _sin = sin(millis() / 100.f);
a = a + gt;
b = b + gt;
c = c - gt;
d = d - gt;
x1 = a * _cos;
y1 = b * _sin;
x2 = c * _cos;
y2 = d * _sin;
/*
Tulip
*/
line(x1 + w, y1, w, y1 + h); //this is the line animation
line(x2 + w, y2, w, y2 + h);
line(y1 + w, x1, w, x1 + h);
line(y2 + w, x2, w, x2 + h);
stroke(255, 0, 255);
//saveFrame("frames/####.tga");
if (poem == 1) {
text("Living in the earth deposits of our history", 200, 30);
fill(0);
}
if (poem == 2) {
text("Today a backhoe divulged out of a crumbling flank of earth", 200, 100);
fill(0);
}
if (poem == 3) {
text("one bottle amber perfect a hundred-year-old", 200, 130);
fill(0);
}
if (poem == 4) {
text("cure for fever or melancholy a tonic", 200, 160);
fill(0);
}
if (poem == 5) {
text("Today I was reading about Marie Curie:", 200, 230);
fill(0);
}
if (poem == 6) {
text("she must have known she suffered from radiation sickness", 200, 260);
fill(0);
}
if (poem == 7) {
text("her body bombarded for years by the element", 200, 290);
fill(0);
}
if (poem == 8) {
text("she had purified", 200, 320);
fill(0);
}
if (poem == 9) {
text("It seems she denied to the end", 200, 350);
fill(0);
}
if (poem == 10) {
text("the source of the cataracts on her eyes", 200, 380);
fill(0);
}
if (poem == 11) {
text("the cracked and suppurating skin of her finger-ends", 200, 410);
fill(0);
}
if (poem == 12) {
text("til she could no longer hold a test-tube or a pencil", 200, 440);
fill(0);
}
if (poem == 13) {
text("She died a famous woman denying", 200, 510);
fill(0);
}
if (poem == 14) {
text("her wounds", 200, 540);
fill(0);
}
if (poem == 15) {
text("denying", 200, 570);
fill(0);
}
if (poem == 16) {
text("her wounds came from the same source as her power", 200, 600);
fill(0);
}
if (poem == 17) {
text("'Power' - Adrienne Rich", 200, 670);
fill(0);
}
}