Programming Interactivity : A Designer's Guide to Processing, Arduino, and OpenFrameworks

Programming Interactivity : A Designer's Guide to Processing, Arduino, and OpenFrameworks

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 712 p.
  • 言語 ENG
  • 商品コード 9780596154141
  • DDC分類 006.7

Table of Contents

Preface                                            xv
Part I. Introductions
Introducing Interaction Design 3 (18)
What This Book Is for 3 (1)
Programming for Interactivity 4 (8)
The Nature of Interaction 5 (2)
Messages and Interaction 7 (1)
Interfaces and Interaction 8 (2)
Languages of Interaction 10 (2)
Design and Interaction 12 (1)
Art and Interaction 13 (2)
Data Exchange and Exploration 15 (4)
Working Process 19 (2)
Programming Basics 21 (32)
Why You'll Read This Chapter More than 22 (1)
Once
The Nature of Code 22 (1)
Variables 23 (14)
Simple Types 24 (5)
Arrays 29 (4)
Casting 33 (1)
Operators 33 (4)
Control Statements 37 (4)
If/then 37 (1)
For Loop 38 (1)
While Loop 39 (1)
Continue 40 (1)
Break 40 (1)
Functions 41 (5)
Defining a Function 41 (1)
Passing Parameters to a Method 42 (2)
Some Suggestions on Writing Functions 44 (1)
Overloading Functions 44 (2)
Objects and Properties 46 (3)
Scope 49 (1)
Review 50 (3)
Processing 53 (38)
Downloading and Installing Processing 54 (1)
Exploring the Processing IDE 54 (2)
The Basics of a Processing Application 56 (4)
The setup() Method 56 (1)
The draw() Method 57 (3)
The Basics of Drawing with Processing 60 (7)
The rect(), ellipse(), and line() 60 (2)
Methods
RGB Versus Hexadecimal 62 (1)
The fill() Method 63 (2)
The background() Method 65 (1)
The line() Method 65 (1)
The stroke() and stroke Weight() Methods 65 (1)
The curve() Method 66 (1)
The vertex() and curve Vertex() Methods 66 (1)
Capturing Simple User Interaction 67 (10)
The mouseX and mouseY Variables 68 (1)
The mousePressed() Method 69 (1)
The mouseReleased() and mouseDragged() 70 (3)
Methods
The keyPressed and key Variables 73 (4)
Importing Libraries 77 (2)
Downloading Libraries 77 (2)
Loading Things into Processing 79 (6)
Loading and Displaying Images 79 (2)
Displaying Videos in the Processing 81 (1)
Environment
Using the Movie Class 81 (2)
Reading and Writing Files 83 (2)
Running and Debugging Applications 85 (1)
Exporting Processing Applications 86 (2)
Conclusion 88 (1)
Review 89 (2)
Arduino 91 (38)
Starting with Arduino 92 (5)
Installing the IDE 93 (3)
Configuring the IDE 96 (1)
Touring Two Arduino Boards 97 (5)
The Controller 97 (1)
Duemilanove Versus Mini 97 (5)
Touring the Arduino IDE 102(3)
The Basics of an Arduino Application 105(3)
The setup Statement 106(1)
The loop Method 106(2)
Features of the Arduino Language 108(7)
Constants 109(1)
Methods 110(1)
Arrays 111(1)
Strings 112(3)
How to Connect Things to Your Board 115(2)
Hello World 117(5)
Debugging Your Application 122(2)
Importing Libraries 124(2)
Running Your Code 126(1)
Running Your Board Without a USB 126(1)
Connection
Review 127(2)
Programming Revisited 129(24)
Object-Oriented Programming 129(1)
Classes 130(3)
The Basics of a Class 131(1)
Class Rules 132(1)
Public and Private Properties 133(2)
Inheritance 135(2)
Processing: Classes and Files 137(2)
C++: Classes and Files 139(5)
.cpp and .h 140(2)
A Simple C++ Application 142(2)
Pointers and References 144(7)
Reference 146(1)
Pointer 146(1)
When to Use Pointers 147(1)
Large Data Objects 148(1)
Pointers and Arrays 149(1)
When Are You Going to Use This? 150(1)
Review 151(2)
Openframeworks 153(40)
Your IDE and Computer 154(2)
Windows 154(1)
Mac OS X 155(1)
Linux 155(1)
Taking Another Quick Tour of C++ 156(4)
Basic Variable Types 157(1)
Arrays 157(1)
Methods 158(1)
Classes and Objects in C++ 159(1)
Getting Started with oF 160(6)
Touring an oF Application 166(2)
Methods 166(2)
Variables 168(1)
Creating ``Hello, World'' 168(3)
Drawing in 2D 171(5)
Setting Drawing Modes 172(2)
Drawing Polygons 174(2)
Displaying Video Files and Images 176(4)
Images 176(2)
Video 178(2)
Importing Libraries 180(3)
OfxOpenCv 181(1)
OfxVectorGraphics 181(1)
OfxVectorMath 182(1)
OfxNetwork 182(1)
OfxOsc 182(1)
Compiling an oF Program 183(1)
Compiling in Xcode 183(1)
Compiling in Code::Blocks 184(1)
Debugging an oF Application 184(4)
Using the printf Statement 184(1)
Using the GNU Debugger 185(1)
Using the Debugger in Xcode 186(2)
Using the Debugger in Code::Blocks 188(1)
Review 188(5)
Part II. Themes
Sound and Audio 193(52)
Sound As Feedback 194(3)
Sound and Interaction 197(2)
How Sound Works on a Computer 199(3)
Audio in Processing 202(12)
Instantiating the Minim Library 202(2)
Generating Sounds with Minim 204(4)
Filtering Sounds with Minim 208(6)
Sound in openFrameworks 214(7)
OpenFrameworks and the FMOD Ex Library 221(7)
The Sound Object Library 228(5)
The Magic of the Fast Fourier Transform 233(5)
Physical Manipulation of Sound with 238(1)
Arduino
A Quick Note on PWM 239(3)
Creating Interactions with Sound 242(1)
Further Resources 242(1)
Review 243(2)
Physical Input 245(44)
Interacting with Physical Controls 245(1)
Thinking About Kinetics 246(1)
Getting Gear for this Chapter 247(1)
Controlling Controls 248(1)
The Button As an Electrical Object 248(1)
The Button As an Interactive Object 248(1)
The Button As a Value in Code 248(1)
Turning Knobs 249(2)
The Dial As an Interactive Object 249(1)
Potentiometers 249(2)
Using Lights 251(3)
Wiring an LED 252(1)
Detecting Touch and Vibration 253(1)
Reading a Piezo Sensor 254(5)
Getting Piezo Sensors 255(4)
Communicating with Other Applications 259(6)
Sending Messages from the Arduino 262(1)
OpenFrameworks 263(2)
Detecting Motion 265(1)
PIR Motion Sensor 265(4)
Reading Distance 267(2)
Reading Input from an Infrared Sensor 269(1)
Understanding Binary Numbers 270(1)
Binary Numbers 270(3)
Bits and Bit Operations 271(2)
Why Do You Need to Know Any of This? 273(11)
Detecting Forces and Tilt 273(5)
Introducting 12C 278(5)
What is a Physical Interface? 283(1)
What's Next 284(2)
Review 286(3)
Programming Graphics 289(48)
The Screen and Graphics 289(3)
Seeing is Thinking, Looking is Reading 292(1)
Math, Graphics, and Coordinate Systems 293(3)
Drawing Strategies 296(7)
Use Loops to Draw 296(2)
Use Arrays to Draw 298(5)
Draw Only What You Need 303(1)
Use Sprites 303(1)
Processing and Transformation Matrices 303(4)
Creating Motion 307(8)
Shaping the Gaze 308(1)
Setting the Mood 308(2)
Creating Tweens 310(5)
Using Vectors 315(10)
Using Graphical Controls 325(3)
ControlP5 Library 326(1)
Event Handling 326(2)
Importing and Exporting Graphics 328(5)
Using PostScript in Processing 329(1)
Using PostScript Files in oF 330(3)
What's Next 333(1)
Review 334(3)
Bitmaps and Pixels 337(42)
Using Pixels As Data 338(2)
Using Pixels and Bitmaps As Input 340(1)
Providing Feedback with Bitmaps 341(1)
Looping Through Pixels 342(3)
Manipulating Bitmaps 345(4)
Manipulating Color Bytes 347(1)
Using Convolution in Full Color 348(1)
Analyzing Bitmaps in oF 349(12)
Analyzing Color 350(1)
Analyzing Brightness 351(2)
Detecting Motion 353(2)
Using Edge Detection 355(6)
Using Pixel Data 361(7)
Using Textures 368(7)
Textures in oF 369(4)
Textures in Processing 373(2)
Saving a Bitmap 375(1)
What's Next 376(1)
Review 377(2)
Physical Feedback 379(44)
Using Motors 380(6)
DC Motors 381(3)
Stepper Motors 384(2)
Other Options 386(1)
Using Servos 386(6)
Connecting a Servo 387(1)
Communicating with the Servo 387(1)
Wiring a Servo 388(4)
Using Household Currents 392(1)
Working with Appliances 393(2)
Introducing the LilyPad Board 395(2)
Using Vibration 397(7)
Using an LED Matrix 404(8)
Using the Matrix Library 404(3)
Using the LedControl Library 407(3)
Using the SPI Protocol 410(2)
Using LCDs 412(5)
Serial LCD 416(1)
Using Solenoids for Movement 417(3)
What's Next 420(1)
Review 421(2)
Protocols and Communication 423(52)
Communicationg Over Networks 425(1)
Using XML 426(3)
Understanding Networks and the Internet 429(3)
Network Organization 429(1)
Network Identification 430(1)
Network Data Flow 431(1)
Handling Network Communication in 432(9)
Processing
Client Class 432(1)
Server Class 433(3)
Sharing Data Across Applications 436(5)
Understanding Protocols in Networking 441(1)
Using ofxNetwork 442(8)
Creating Networks with the Arduino 450(6)
Initializing the Ethernet Library 451(1)
Creating a Client Connection 452(1)
Creating a Server Connection 453(3)
Using Carnivore to Communicate 456(4)
Installing the Carnivore Library 457(1)
Creating a Carnivore Client 458(2)
Communicating with Bluetooth 460(7)
Using Bluetooth in Processing 461(1)
Using the bluetoothDesktop Library 461(3)
Using the Arduino Bluetooth 464(3)
Communicating Using MIDI 467(4)
Review 471(4)
Part III. Explorations
Graphics and OpenGL 475(42)
What Does 3D Have to Do with Interaction? 475(1)
Understanding 3D 476(1)
Working with 3D in Processing 477(7)
Lighting in Processing 478(2)
Controlling the Viewer's Perspective 480(4)
Making Custom Shapes in Processing 484(3)
Using Coordinates and Transforms in 487(2)
Processing
Working with 3D in OpenGL 489(4)
So, What is OpenGL? 489(1)
Transformations 490(1)
OpenGL in Processing 490(2)
Open GL in openFrameworks 492(1)
Using Matrices and Transformations in 493(3)
OpenGL
Using Vertices in OpenGL 496(1)
Drawing with Textures in oF 496(4)
Lighting in OpenGL 500(1)
Blending Modes in OpenGL 501(5)
Using Textures and Shading in Processing 506(2)
Applying Material Properties 507(1)
Using Another Way of Shading 508(2)
What Does GLSL Look Like? 508(1)
Vertex Shaders 508(1)
Fragment Shader 509(1)
Variables Inside Shaders 510(1)
Using an ofShader Addon 510(3)
What to Do Next 513(1)
Review 514(3)
Detection and Gestures 517(42)
Computer Vision 518(3)
Interfaces Without Controls 519(1)
Example CV Projects 520(1)
OpenCV 521(1)
Using Blobs and Tracking 521(16)
Starting with ofxOpenCV 522(5)
Tracking Blobs with ofxOpenCV 527(10)
Using OpenCV in Processing 537(6)
Exploring Further in OpenCV 542(1)
Detecting Gestures 543(7)
Using ezGestures in Processing 544(4)
Using Gestures in oF 548(2)
Implementing Face Recognition 550(4)
Exploring Touch Devices with oF 554(2)
TouchKit 554(1)
Tuio 555(1)
Touchlib 555(1)
ReacTIVision 555(1)
What's Next 556(1)
Review 557(2)
Movement and Location 559(32)
Using Movement As and in Interaction 559(2)
Using Software-Based Serial Ports 561(2)
Understanding and Using GPS 563(12)
Storing Data 575(2)
Logging GPS Data to an Arduino 577(3)
Using the Breadcrumbs Library 578(1)
Implementing Hardware-Based Logging 579(1)
Sending GPS Data 580(3)
Determining Location by IP Address 583(6)
What to Do Next 589(1)
Review 589(2)
Interfaces and Controls 591(36)
Examining Tools, Affordances, and 592(1)
Aesthetics
Reexamining Tilt 593(4)
Exploring InputShield 597(2)
Understanding Touch 599(1)
Exploring Open Source Touch Hardware 600(14)
Nort_/D 600(3)
Liquidware TouchShield 603(4)
Drawing to the TouchShield Screen 607(2)
Controlling Servos Through the 609(2)
TouchShield
Setting Up Communication Between 611(3)
Arduino and TouchShield
Communicating Using OSC 614(2)
Using the Wiimote 616(9)
Using the Wii Nunchuck in Arduino 616(6)
Tracking Wii Remote Positioning in 622(3)
Processing
What's Next 625(1)
Review 626(1)
Spaces and Environments 627(40)
Using Architecture and Space 627(1)
Sensing Environmental Data 628(1)
Using an XBee with Arduino 629(12)
Creating a Simple Test 632(2)
Configuring the XBee Module 634(1)
Addressing in the XBee 635(2)
XBee Library for Processing 637(4)
Placing Objects in 2D 641(10)
Using the X10 Protocol 651(3)
Setting Up an RFID Sensor 654(5)
Reading Heat and Humidity 659(5)
What's Next 664(1)
Review 664(3)
Further Resources 667(18)
What's Next? 667(14)
Software Tools 667(3)
Construction Processes 670(1)
Artificial Intelligence 671(6)
Physics 677(1)
Hardware Platforms 678(3)
Bibliography 681(3)
Interaction Design 681(1)
Programming 682(1)
Hardware 683(1)
Art 683(1)
Conclusion 684(1)
Appendix: Circuit Diagram Symbols 685(2)
Programming Glossary 687(6)
Index 693