Preface |
|
xiii | |
|
1 Introducing Interaction Design |
|
|
1 | (22) |
|
|
1 | (1) |
|
Programming for Interactivity |
|
|
2 | (13) |
|
The Nature of Interaction |
|
|
3 | (2) |
|
|
5 | (1) |
|
Interfaces and Interaction |
|
|
6 | (1) |
|
|
7 | (8) |
|
|
15 | (1) |
|
|
16 | (1) |
|
Data Exchange and Exploration |
|
|
17 | (4) |
|
|
21 | (2) |
|
|
23 | (32) |
|
Why You'll Read This Chapter More Than Once |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
25 | (14) |
|
|
26 | (5) |
|
|
31 | (4) |
|
|
35 | (1) |
|
|
35 | (4) |
|
|
39 | (4) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
|
42 | (1) |
|
|
42 | (1) |
|
|
43 | (5) |
|
|
43 | (1) |
|
Passing Parameters to a Function |
|
|
44 | (1) |
|
Some Suggestions on Writing Functions |
|
|
45 | (1) |
|
|
46 | (2) |
|
|
48 | (3) |
|
|
51 | (1) |
|
|
52 | (3) |
|
|
55 | (38) |
|
Downloading and Installing Processing |
|
|
56 | (1) |
|
Exploring the Processing IDE |
|
|
56 | (2) |
|
The Basics of a Processing Application |
|
|
58 | (5) |
|
|
58 | (2) |
|
|
60 | (3) |
|
The Basics of Drawing with Processing |
|
|
63 | (7) |
|
The rect(), ellipse(), and line() Methods |
|
|
63 | (1) |
|
|
64 | (2) |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
67 | (1) |
|
The stroke() and stroke Weight() Methods |
|
|
68 | (1) |
|
|
68 | (1) |
|
The vertex() and curveVertex() Methods |
|
|
69 | (1) |
|
Capturing Simple User Interaction |
|
|
70 | (10) |
|
The mouseX and mouseY Variables |
|
|
71 | (1) |
|
The mousePressed() Method |
|
|
71 | (1) |
|
The mouseReleased() and mouseDragged() Methods |
|
|
72 | (3) |
|
The keyPressed and key Variables |
|
|
75 | (5) |
|
|
80 | (1) |
|
|
80 | (1) |
|
Loading External Data into Processing |
|
|
81 | (6) |
|
Loading and Displaying Images |
|
|
81 | (2) |
|
Displaying Videos in the Processing Environment |
|
|
83 | (1) |
|
|
83 | (2) |
|
Reading and Writing Files |
|
|
85 | (2) |
|
Running and Debugging Applications |
|
|
87 | (1) |
|
Exporting Processing Applications |
|
|
88 | (3) |
|
|
91 | (1) |
|
|
91 | (2) |
|
|
93 | (40) |
|
|
94 | (5) |
|
|
95 | (2) |
|
|
97 | (2) |
|
|
99 | (6) |
|
|
99 | (1) |
|
Uno Versus Mini Versus Mega |
|
|
99 | (6) |
|
|
105 | (3) |
|
The Basics of an Arduino Application |
|
|
108 | (2) |
|
|
108 | (1) |
|
|
108 | (2) |
|
Features of the Arduino Language |
|
|
110 | (8) |
|
|
112 | (1) |
|
|
112 | (2) |
|
|
114 | (1) |
|
|
114 | (4) |
|
How to Connect Things to Your Board |
|
|
118 | (3) |
|
|
120 | (1) |
|
|
121 | (3) |
|
Debugging Your Application |
|
|
124 | (3) |
|
|
127 | (3) |
|
|
130 | (1) |
|
Running Your Board Without a USB Connection |
|
|
130 | (1) |
|
|
130 | (3) |
|
|
133 | (26) |
|
Object-Oriented Programming |
|
|
133 | (1) |
|
|
134 | (3) |
|
|
135 | (1) |
|
|
136 | (1) |
|
Public and Private Properties |
|
|
137 | (2) |
|
|
139 | (2) |
|
Processing: Classes and Files |
|
|
141 | (2) |
|
|
143 | (5) |
|
|
144 | (2) |
|
|
146 | (2) |
|
|
148 | (10) |
|
|
150 | (1) |
|
|
151 | (2) |
|
|
153 | (1) |
|
|
154 | (1) |
|
|
154 | (1) |
|
Some Rules for References |
|
|
155 | (1) |
|
|
156 | (1) |
|
When Are You Going to Use This? |
|
|
157 | (1) |
|
|
158 | (1) |
|
|
159 | (40) |
|
|
160 | (2) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
161 | (1) |
|
Taking Another Quick Tour of C++ |
|
|
162 | (4) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
164 | (1) |
|
Classes and Objects in C++ |
|
|
165 | (1) |
|
|
166 | (6) |
|
Touring an oF Application |
|
|
172 | (2) |
|
|
172 | (2) |
|
|
174 | (1) |
|
|
174 | (2) |
|
|
176 | (6) |
|
|
179 | (1) |
|
|
179 | (3) |
|
Displaying Video Files and Images |
|
|
182 | (4) |
|
|
182 | (2) |
|
|
184 | (2) |
|
|
186 | (2) |
|
|
186 | (2) |
|
Compiling in Code::Blocks |
|
|
188 | (1) |
|
Debugging an oF Application |
|
|
188 | (5) |
|
|
189 | (1) |
|
|
190 | (1) |
|
Using the Debugger in Xcode |
|
|
190 | (2) |
|
Using the Debugger in Code::Blocks |
|
|
192 | (1) |
|
|
193 | (3) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
196 | (1) |
|
|
196 | (3) |
|
|
199 | (48) |
|
Interacting with Physical Controls |
|
|
199 | (1) |
|
|
200 | (1) |
|
Getting Gear for This Chapter |
|
|
201 | (1) |
|
|
202 | (1) |
|
The Button As an Electrical Object |
|
|
202 | (1) |
|
The Button As an Interactive Object |
|
|
202 | (1) |
|
Reading the Value of a Button |
|
|
202 | (1) |
|
|
203 | (3) |
|
The Dial As an Interactive Object |
|
|
203 | (1) |
|
|
203 | (3) |
|
|
206 | (2) |
|
|
206 | (2) |
|
Detecting Touch and Vibration |
|
|
208 | (2) |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
210 | (6) |
|
Proximity Through Capacitance |
|
|
210 | (6) |
|
|
216 | (2) |
|
|
216 | (2) |
|
|
218 | (4) |
|
Reading Input from an Infrared Sensor |
|
|
220 | (2) |
|
Understanding Binary Numbers |
|
|
222 | (3) |
|
|
222 | (1) |
|
|
222 | (3) |
|
Why Do You Need to Know Any of This? |
|
|
225 | (1) |
|
Communicating with Other Applications |
|
|
225 | (3) |
|
Sending Messages from the Arduino |
|
|
228 | (4) |
|
|
229 | (3) |
|
Detecting Forces and Tilt |
|
|
232 | (5) |
|
|
237 | (6) |
|
|
240 | (3) |
|
|
243 | (1) |
|
|
244 | (3) |
|
|
247 | (50) |
|
|
248 | (2) |
|
Seeing Is Thinking, Looking Is Reading |
|
|
250 | (1) |
|
Math, Graphics, and Coordinate Systems |
|
|
251 | (3) |
|
|
254 | (9) |
|
|
254 | (2) |
|
|
256 | (6) |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
263 | (4) |
|
|
267 | (9) |
|
|
268 | (1) |
|
|
268 | (2) |
|
|
270 | (6) |
|
|
276 | (9) |
|
|
285 | (3) |
|
|
286 | (1) |
|
|
286 | (2) |
|
Importing and Exporting Graphics |
|
|
288 | (6) |
|
Using PostScript in Processing |
|
|
289 | (1) |
|
Using PostScript Files in oF |
|
|
290 | (4) |
|
|
294 | (1) |
|
|
294 | (3) |
|
|
297 | (44) |
|
|
298 | (2) |
|
Using Pixels and Bitmaps As Input |
|
|
300 | (1) |
|
Providing Feedback with Bitmaps |
|
|
301 | (1) |
|
|
302 | (4) |
|
|
303 | (3) |
|
|
306 | (5) |
|
|
309 | (1) |
|
Using Convolution in Full Color |
|
|
310 | (1) |
|
|
311 | (10) |
|
|
312 | (2) |
|
|
314 | (1) |
|
|
315 | (6) |
|
|
321 | (7) |
|
|
328 | (3) |
|
|
331 | (7) |
|
|
332 | (3) |
|
|
335 | (3) |
|
|
338 | (1) |
|
|
339 | (1) |
|
|
339 | (2) |
|
|
341 | (48) |
|
|
342 | (3) |
|
|
345 | (2) |
|
How Sound Works on a Computer |
|
|
347 | (3) |
|
|
350 | (12) |
|
Instantiating the Minim Library |
|
|
350 | (2) |
|
Generating Sounds with Minim |
|
|
352 | (4) |
|
Filtering Sounds with Minim |
|
|
356 | (6) |
|
|
362 | (2) |
|
openFrameworks and the FMOD Ex Library |
|
|
364 | (7) |
|
|
371 | (10) |
|
Physical Manipulation of Sound with Arduino |
|
|
381 | (1) |
|
|
382 | (3) |
|
Creating Interactions with Sound |
|
|
385 | (1) |
|
|
385 | (1) |
|
|
386 | (3) |
|
|
389 | (46) |
|
|
390 | (7) |
|
|
391 | (3) |
|
|
394 | (2) |
|
|
396 | (1) |
|
|
397 | (2) |
|
|
399 | (6) |
|
|
400 | (1) |
|
Communicating with the Servo |
|
|
400 | (1) |
|
|
401 | (4) |
|
|
405 | (3) |
|
|
408 | (6) |
|
Introducing the LilyPad Board |
|
|
414 | (2) |
|
|
416 | (3) |
|
|
419 | (1) |
|
|
419 | (3) |
|
Using the LED Control Library |
|
|
419 | (3) |
|
|
422 | (1) |
|
|
423 | (2) |
|
|
425 | (4) |
|
Using Solenoids for Movement |
|
|
429 | (3) |
|
|
432 | (1) |
|
|
432 | (3) |
|
12 Protocols and Communication |
|
|
435 | (54) |
|
Communicating over Networks |
|
|
436 | (2) |
|
|
438 | (3) |
|
Understanding Networks and the Internet |
|
|
441 | (2) |
|
|
441 | (1) |
|
|
442 | (1) |
|
|
443 | (1) |
|
Handling Network Communication in Processing |
|
|
443 | (10) |
|
|
444 | (1) |
|
|
445 | (3) |
|
Sharing Data Across Applications |
|
|
448 | (5) |
|
Understanding Protocols in Networking |
|
|
453 | (1) |
|
Using the ofxNetwork Add-on |
|
|
454 | (15) |
|
Creating Networks with the Arduino |
|
|
469 | (6) |
|
Initializing the Ethernet Library |
|
|
470 | (1) |
|
Creating a Client Connection |
|
|
470 | (2) |
|
Creating a Server Connection |
|
|
472 | (3) |
|
Wireless Internet on the Arduino |
|
|
475 | (4) |
|
Communicating with Bluetooth |
|
|
479 | (3) |
|
Using Bluetooth in Processing |
|
|
479 | (1) |
|
Using the bluetoothDesktop Library |
|
|
480 | (2) |
|
|
482 | (4) |
|
|
486 | (3) |
|
|
489 | (46) |
|
What Does 3-D Have to Do with Interaction? |
|
|
489 | (1) |
|
|
490 | (1) |
|
|
491 | (1) |
|
Working with 3-D in Processing |
|
|
492 | (8) |
|
|
493 | (1) |
|
|
494 | (2) |
|
Controlling the Viewer's Perspective |
|
|
496 | (4) |
|
Making Custom Shapes in Processing |
|
|
500 | (3) |
|
Using Coordinates and Transforms in Processing |
|
|
503 | (3) |
|
|
506 | (1) |
|
|
506 | (3) |
|
|
508 | (1) |
|
Transformations in openFrameworks |
|
|
509 | (1) |
|
|
509 | (2) |
|
|
511 | (4) |
|
Creating 3-D Objects in oF |
|
|
515 | (4) |
|
Using Textures and Shading in Processing |
|
|
519 | (1) |
|
Using Another Way of Shading |
|
|
520 | (4) |
|
What Does GLSL Look Like? |
|
|
520 | (1) |
|
|
521 | (1) |
|
|
522 | (1) |
|
|
522 | (1) |
|
|
523 | (1) |
|
|
524 | (6) |
|
Using Shaders in Processing |
|
|
530 | (1) |
|
|
531 | (1) |
|
|
532 | (3) |
|
|
535 | (48) |
|
|
536 | (3) |
|
Interfaces Without Controls |
|
|
537 | (1) |
|
|
538 | (1) |
|
|
539 | (1) |
|
|
539 | (6) |
|
|
540 | (5) |
|
Detecting Features with oF |
|
|
545 | (4) |
|
Using OpenCV in Processing |
|
|
549 | (5) |
|
Feature Tracking in Processing |
|
|
554 | (5) |
|
Using Blob Tracking with Physics |
|
|
559 | (6) |
|
Exploring Further in OpenCV |
|
|
565 | (1) |
|
|
566 | (8) |
|
Using ezGestures in Processing |
|
|
567 | (3) |
|
|
570 | (4) |
|
Capturing iOS gestures with oF |
|
|
574 | (3) |
|
|
577 | (1) |
|
|
577 | (1) |
|
|
578 | (1) |
|
|
578 | (1) |
|
|
578 | (1) |
|
Using the Microsoft Kinect |
|
|
579 | (1) |
|
|
579 | (1) |
|
|
580 | (1) |
|
|
580 | (3) |
|
|
583 | (30) |
|
Using Movement As and In Interaction |
|
|
583 | (2) |
|
Using Software-Based Serial Ports |
|
|
585 | (2) |
|
Understanding and Using GPS |
|
|
587 | (12) |
|
|
599 | (3) |
|
Logging GPS Data to an Arduino |
|
|
602 | (4) |
|
Using the breadcrumbs Library |
|
|
602 | (1) |
|
Implementing Hardware-Based Logging |
|
|
603 | (3) |
|
|
606 | (2) |
|
Getting Location on a Mobile Device |
|
|
608 | (2) |
|
|
608 | (1) |
|
|
609 | (1) |
|
|
610 | (1) |
|
|
610 | (3) |
|
16 Spaces and Environments |
|
|
613 | (44) |
|
Using Architecture and Space |
|
|
613 | (1) |
|
Sensing Environmental Data |
|
|
614 | (1) |
|
Using an XBee with Arduino |
|
|
615 | (12) |
|
|
618 | (2) |
|
Configuring the XBee Module |
|
|
620 | (2) |
|
|
622 | (1) |
|
XBee Library for Processing |
|
|
623 | (4) |
|
|
627 | (7) |
|
|
634 | (3) |
|
Setting Up an RFID Sensor |
|
|
637 | (6) |
|
Reading Heat and Humidity |
|
|
643 | (5) |
|
Determine Position of an Object |
|
|
648 | (7) |
|
|
655 | (1) |
|
|
655 | (2) |
|
|
657 | (18) |
|
|
657 | (13) |
|
|
657 | (3) |
|
|
660 | (1) |
|
|
661 | (1) |
|
|
662 | (6) |
|
|
668 | (2) |
|
|
670 | (3) |
|
|
670 | (1) |
|
|
671 | (1) |
|
|
672 | (1) |
|
|
672 | (1) |
|
|
673 | (2) |
Index |
|
675 | |