About the Author |
|
xiii | |
About the Technical Reviewers |
|
xv | |
Acknowledgments |
|
xvii | |
Introduction |
|
xix | |
|
|
1 | (30) |
|
|
2 | (5) |
|
Programming Languages and Natural Languages |
|
|
2 | (1) |
|
|
3 | (2) |
|
|
5 | (1) |
|
Specifying Positions and Angles |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
Processing Programming Features |
|
|
8 | (5) |
|
Processing Development Environment |
|
|
8 | (2) |
|
|
10 | (1) |
|
|
11 | (2) |
|
Implementing Hello, World |
|
|
13 | (8) |
|
Implementing the Daddy Logo |
|
|
21 | (6) |
|
|
21 | (3) |
|
|
24 | (3) |
|
|
27 | (1) |
|
How to Make This Your Own |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
31 | (26) |
|
|
33 | (2) |
|
|
33 | (1) |
|
|
34 | (1) |
|
Displaying Images from Files |
|
|
34 | (1) |
|
Calculations, Including Built-in Functions |
|
|
34 | (1) |
|
|
35 | (1) |
|
Processing Programming Features |
|
|
35 | (4) |
|
|
39 | (1) |
|
Polygon Sketch Operation Overview |
|
|
40 | (2) |
|
Implementing the Polygon Sketch |
|
|
42 | (6) |
|
|
42 | (4) |
|
|
46 | (2) |
|
Coin Toss Sketch Operation Overview |
|
|
48 | (2) |
|
Implementing the Coin Toss Sketch |
|
|
50 | (3) |
|
|
50 | (3) |
|
|
53 | (1) |
|
How to Make This Your Own |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
55 | (2) |
|
Chapter 3 Animation Using Arrays and Parallel Structures |
|
|
57 | (26) |
|
|
57 | (6) |
|
|
63 | (2) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
Processing Programming Features |
|
|
65 | (4) |
|
Implementing a Bouncing Ball |
|
|
69 | (2) |
|
|
69 | (1) |
|
|
70 | (1) |
|
Implementing a Set of Three Bouncing Balls |
|
|
71 | (3) |
|
|
72 | (1) |
|
|
72 | (2) |
|
Implementing Pentagon Bouncing |
|
|
74 | (2) |
|
|
74 | (2) |
|
Implementing Bouncing Polygons |
|
|
76 | (3) |
|
|
76 | (1) |
|
|
77 | (2) |
|
|
79 | (1) |
|
|
80 | (1) |
|
How to Make This Your Own |
|
|
80 | (1) |
|
|
81 | (1) |
|
|
81 | (2) |
|
|
83 | (40) |
|
|
83 | (1) |
|
|
83 | (2) |
|
|
84 | (1) |
|
|
85 | (1) |
|
Processing Programming Features |
|
|
85 | (3) |
|
|
85 | (1) |
|
|
86 | (2) |
|
Tolerance and OK So Far Coding |
|
|
88 | (1) |
|
Bouncing Objects Overview |
|
|
88 | (2) |
|
Implementing the Bouncing Objects |
|
|
90 | (6) |
|
|
90 | (2) |
|
|
92 | (4) |
|
Make Path and Travel Path Overview |
|
|
96 | (4) |
|
Implementing the Make Path and Travel Path |
|
|
100 | (5) |
|
|
100 | (2) |
|
|
102 | (3) |
|
|
105 | (2) |
|
|
107 | (13) |
|
|
108 | (1) |
|
|
109 | (11) |
|
|
120 | (1) |
|
|
121 | (1) |
|
How to Make This Your Own |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
122 | (1) |
|
Chapter 5 More Interactions |
|
|
123 | (44) |
|
|
123 | (1) |
|
|
123 | (3) |
|
|
124 | (1) |
|
Character (char) Data Type vs. String Data Type |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
Processing Programming Features |
|
|
126 | (4) |
|
|
126 | (1) |
|
The keyPressed Function, key, and keyCode |
|
|
126 | (1) |
|
|
127 | (1) |
|
|
127 | (2) |
|
The millis and Other Time Functions |
|
|
129 | (1) |
|
|
130 | (2) |
|
Slingshot Operation Overview |
|
|
132 | (1) |
|
Implementing the Slingshot Sketch |
|
|
133 | (12) |
|
|
133 | (3) |
|
Programming the Slingshot Sketch |
|
|
136 | (9) |
|
|
145 | (1) |
|
Implementing the Snake Sketch |
|
|
146 | (18) |
|
|
147 | (1) |
|
Programming the Snake Sketch |
|
|
148 | (8) |
|
Image Test Operation Overview |
|
|
156 | (3) |
|
Implementing the Image Test |
|
|
159 | (5) |
|
|
164 | (1) |
|
How to Make This Your Own |
|
|
164 | (1) |
|
|
165 | (2) |
|
|
165 | (2) |
|
Chapter 6 Images, Graphics, and Building on Prior Work |
|
|
167 | (28) |
|
|
167 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
Images as Arrays of Pixels |
|
|
168 | (1) |
|
|
169 | (1) |
|
Processing Programming Features |
|
|
169 | (3) |
|
Getting a File from the Web |
|
|
169 | (1) |
|
|
170 | (1) |
|
The beginShape and endShape Vertex Functions |
|
|
171 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
Image to Grayscale Operation Overview |
|
|
172 | (8) |
|
Implementing the Image to Grayscale |
|
|
180 | (6) |
|
|
180 | (1) |
|
Programming the Image to Grayscale |
|
|
181 | (5) |
|
Origami Flower Operation Overview |
|
|
186 | (1) |
|
Implementing the Origami Flower Sketch |
|
|
187 | (6) |
|
|
187 | (2) |
|
Programming the Origami Flower |
|
|
189 | (4) |
|
|
193 | (1) |
|
How to Make This Your Own |
|
|
193 | (1) |
|
|
194 | (1) |
|
|
194 | (1) |
|
Chapter 7 Using Files for Making a Holiday Card |
|
|
195 | (26) |
|
|
196 | (2) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
Processing Programming Features |
|
|
198 | (4) |
|
|
198 | (1) |
|
Making and Saving an Image of the Current Window |
|
|
199 | (1) |
|
Use of Java Input/Output Library |
|
|
200 | (1) |
|
|
201 | (1) |
|
Show Fonts Sketch Operation Overview |
|
|
202 | (1) |
|
Implementing the Show Fonts Sketch |
|
|
203 | (2) |
|
Programming the Show Fonts Sketch |
|
|
204 | (1) |
|
Make Card Sketch Operation Overview |
|
|
205 | (5) |
|
Implementing the Make Card Sketch |
|
|
210 | (8) |
|
|
210 | (2) |
|
Programming the Make Card Sketch |
|
|
212 | (6) |
|
|
218 | (1) |
|
|
219 | (1) |
|
How to Make This Your Own |
|
|
219 | (1) |
|
|
219 | (1) |
|
|
220 | (1) |
|
Chapter 8 Combining Videos, Images, and Graphics |
|
|
221 | (22) |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
Processing Programming Features |
|
|
222 | (2) |
|
|
222 | (2) |
|
|
224 | (1) |
|
|
224 | (1) |
|
Family Collage Operation Overview |
|
|
225 | (2) |
|
Implementing the Family Collage Sketch |
|
|
227 | (10) |
|
|
227 | (1) |
|
Programming the Family Collage Sketch |
|
|
228 | (9) |
|
|
237 | (1) |
|
How to Make This Your Own |
|
|
237 | (5) |
|
|
242 | (1) |
|
|
242 | (1) |
|
|
243 | (28) |
|
|
243 | (2) |
|
|
245 | (2) |
|
Implementing an Existing Application |
|
|
246 | (1) |
|
|
246 | (1) |
|
Processing Programming Features |
|
|
247 | (2) |
|
Hangman Sketches Operation Overview |
|
|
249 | (4) |
|
Implementing the Hangman Sketches |
|
|
253 | (15) |
|
|
253 | (2) |
|
Programming the Hangman Sketches |
|
|
255 | (13) |
|
|
268 | (1) |
|
How to Make This Your Own |
|
|
269 | (1) |
|
|
269 | (1) |
|
|
269 | (2) |
|
|
271 | (32) |
|
|
274 | (1) |
|
Processing Programming Features |
|
|
275 | (9) |
|
|
284 | (1) |
|
Rolling Ball at Alhambra Operation Overview |
|
|
284 | (1) |
|
Implementing the Rolling Ball at Alhambra |
|
|
285 | (6) |
|
|
285 | (1) |
|
Programming the Rolling Ball at Alhambra |
|
|
286 | (5) |
|
Rotating Cube Operation Overview |
|
|
291 | (1) |
|
Implementing the Rotating Cube |
|
|
291 | (7) |
|
|
291 | (2) |
|
Programming the Rotating Cube |
|
|
293 | (5) |
|
|
298 | (1) |
|
How to Make This Your Own |
|
|
299 | (2) |
|
|
301 | (1) |
|
|
302 | (1) |
|
Appendix A Publishing on the Web |
|
|
303 | (10) |
|
|
306 | (1) |
|
|
307 | (1) |
|
Adding HTML to the body Element |
|
|
308 | (1) |
|
Adding Responses to Touch |
|
|
309 | (4) |
Index |
|
313 | |