- About
- Buy the Book
- Downloads
- Errata
- Examples
- Chapter 1
- Chapter 2
- Chapter 3
- Chapter 4
- Chapter 5
- Draggable Shape
- Example 5-1: Conditionals
- Example 5-2: More Conditionals
- Example 5-3: Rollovers
- Example 5-4: Hold Down the Button
- Example 5-5: Button as Switch
- Example 5-6: Bouncing Ball
- Example 5-7: “Bouncing” Color
- Example 5-8: Square Following Edge, Uses a “State” Variable
- Example 5-9: Simple Gravity
- Example 5-10: Zoog and Conditionals
- Chapter 6
- Example 6-1: Many Lines
- Example 6-2: Many Lines with Variables
- Example 6-3: While Loop
- Example 6-4: Infinite Loop. Don’t Do This!
- Example 6-5: Another Infinite Loop. Don’t Do This!
- Example 6-6: Legs with a For Loop
- Example 6-7: Local Variables
- Example 6-8: Lines One at a Time
- Example 6-9: Simple While Loop with Interactivity
- Example 6-10: Zoog with Arms
- Example 6-11: Multiple Zoogs
- Chapter 7
- Chapter 8
- Chapter 9
- Example 9-1: Additional Array Declaration and Creation Examples
- Example 9-2: Initializing the Elements of an Array One at a Time
- Example 9-3: Initializing the Elements of an Array All at Once
- Example 9-4: Using a While Loop to Initialize All Elements of an Array
- Example 9-5: Using a For Loop to Initialize All Elements of an Array
- Example 9-6: An Array Operation
- Example 9-7: An Array Operation Using Dot Length
- Example 9-8: A Snake Following the Mouse
- Example 9-9: An Array of Car Objects
- Example 9-10: Interactive Stripes
- Example 9-11: Resizing an Array Using Append()
- Example 9-12: 200 Zoog Objects in an Array
- Chapter 10
- Example 10-1: Catcher
- Example 10-2: Bouncing Ball Class
- Example 10-3: Bouncing Ball with Intersection
- Example 10-4: Implementing a Timer
- Example 10-5: Object-Oriented Timer
- Example 10-6: Simple Raindrop Behavior
- Example 10-7: Drops One at a Time
- Example 10-8: Fancier Looking Raindrop
- Example 10-9: Using All the Objects in One Sketch
- Example 10-10: The Raindrop Catching Game
- Chapter 13
- Example 13-1: Modulo
- Example 13-2: Random Number Distribution
- Example 13-3: Probabilities
- Example 13-4: Perlin Noise
- Example: Noise Graph
- Example: Random Graph
- Example 13-5: Polar to Cartesian
- Example 13-6: Oscillation
- Example 13-7: Wave
- Example 13-8: Recursion
- Example 13-9: Two-Dimensional Array
- Example 13-10: Two-Dimensional Array of Objects
- Chapter 14
- Example 14-1: A Growing Rectangle, or a Rectangle Moving Toward You?
- Example 14-2: Multiple Translations
- Example 14-3: A Rectangle Moving Along the Z-Axis
- Example 14-4: Pyramid Using beginShape(TRIANGLES)
- Example 14-5: Rectangle Rotating Around Center
- Example 14-6: rotateZ()
- Example 14-7: rotateX()
- Example 14-8: rotateY()
- Example 14-9: Rotate Around More than One Axis
- Example 14-10: Pyramid
- Example 14-11: A Growing Rectangle, using scale()
- Example 14-12: Rotating One Square
- Example 14-13: Rotating Another Square
- Example 14-14: Rotating Both Squares
- Example 14-15: Rotating Many Things Using Objects
- Example 14-16: Simple Solar System
- Example 14-17: Nested Push and Pop
- Example 14-18: Object-Oriented Solar System
- Chapter 15
- Example 15-1: “Hello World” Images
- Example 15-2: Image “Sprite”
- Example 15-3: Swapping Images
- Example 15-4: Image Sequence
- Example 15-5: Setting Pixels
- Example 15-6: Setting Pixels According to Their 2D Location
- Example 15-7: Displaying the Pixels of an Image
- Example 15-8: Adjusting Image Brightness
- Example 15-9: Adjusting Image Brightness Based on Pixel Location (Flashlight Effect)
- Example 15-10: Brightness Threshold
- Example 15-11: Brightness Threshold with Filter
- Example 15-12: Pixel Neighbor Differences (edges)
- Example 15-13: Sharpen with Convolution
- Example 15-14: “Pointillism”
- Example 15-15: 2D Image Mapped to 3D
- Chapter 16
- Example 16-1: Display Video
- Example 16-2: Manipulate Video Image
- Example 16-3: Adjust Video Brightness
- Example 16-4: Display QuickTime Movie
- Example 16-5: Scrubbing Forward and Backward in a Movie
- Example 16-6: Drawing a Grid of Squares
- Example 16-7: Video Pixelation
- Example 16-8: Brightness Mirror
- Example 16-9: The Scribbler
- Example 16-10: The Scribbler Mirror
- Example 16-11: Simple Color Tracking
- Example 16-12: Simple Background Removal
- Example 16-13: Simple Motion Detection
- Example 16-14: Overall Motion
- Chapter 17
- Chapter 18
- Example 18-1: User Input
- Example 18-2: Graphing Comma-Separated Numbers from a Text File
- Example 18-3: Creating Object from a Text File
- Example 18-4: Loading and Saving Data to Text File
- Example 18-5: Parsing Yahoo’s XML Weather Feed Manually
- Example 18-6: Analyzing King Lear
- Example 18-7: Loading a URL with simpleML
- Example 18-8: Loading XML with simpleML
- Example 18-9: Using Processing’s XML Library
- Example 18-10: A Yahoo Search
- Example 18-11: Yahoo Search Visualization
- Chapter 19
- Example 19-1: Simple Therapy Server
- Example 19-2: Simple Therapy Client
- Example 19-3: Server Broadcasting a Number (0-255)
- Example 19-4: Client Reading Values as Background Color
- Example 19-5: Client Reading Values as Rotation Value
- Example 19-6: Multi-User Server
- Example 19-7: Client for Multi-User Whiteboard
- Example 19-8: Reading from Serial Port
- Example 19-9: Handshaking
- Example 19-10: Serial Communication with Strings
- Chapter 20
- Chapter 21
- Chapter 22
- Chapter 23
- Exercises
- Chapter 1
- Chapter 2
- Chapter 3
- Chapter 4: Variables
- Chapter 5
- Chapter 6: Loops
- Chapter 7: Functions
- Chapter 8: Objects
- Chapter 9: Arrays
- Chapter 10: Algorithms
- Chapter 13: Mathematics
- Chapter 14: Translation and Rotation (3D)
- Chapter 15: Images (Pixels)
- Chapter 16: Video
- Chapter 17: Text
- Chapter 18: Data Input
- Home Page
- Site Map
- Tutorials








