Learning Processing

Book description

The free, open-source Processing programming language environment was created at MIT for people who want to develop images, animation, and sound. Based on the ubiquitous Java, it provides an alternative to daunting languages and expensive proprietary software. This book gives graphic designers, artists and illustrators of all stripes a jump start to working with processing by providing detailed information on the basic principles of programming with the language, followed by careful, step-by-step explanations of select advanced techniques.The author teaches computer graphics at NYU's Tisch School of the Arts, and his book has been developed with a supportive learning experience at its core. From algorithms and data mining to rendering and debugging, it teaches object-oriented programming from the ground up within the fascinating context of interactive visual media.Previously announced as "Pixels, Patterns, and Processing"
  • A guided journey from the very basics of computer programming through to creating custom interactive 3D graphics
  • Step-by-step examples, approachable language, exercises, and LOTS of sample code support the reader's learning curve
  • Includes lessons on how to program live video, animated images and interactive sound

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Acknowledgments
  6. Introduction
    1. What is this book?
    2. Who is this book for?
    3. What is Processing?
    4. But shouldn’t I be learning __________ ?
    5. Write in this book!
    6. How should I read this book?
    7. Is this a textbook?
    8. Will this be on the test?
    9. Do you have a web site?
    10. Take It One Step at a Time
    11. Algorithms
  7. Lesson 1: The Beginning
    1. Chapter 1. Pixels
      1. 1.1 Graph Paper
      2. 1.2 Simple Shapes
      3. 1.3 Grayscale Color
      4. 1.4 RGB Color
      5. 1.5 Color Transparency
      6. 1.6 Custom Color Ranges
    2. Chapter 2. Processing
      1. 2.1 Processing to the Rescue
      2. 2.2 How do I get Processing?
      3. 2.3 The Processing Application
      4. 2.4 The Sketchbook
      5. 2.5 Coding in Processing
      6. 2.6 Errors
      7. 2.7 The Processing Reference
      8. 2.8 The “Play” Button
      9. 2.9 Your First Sketch
      10. 2.10 Publishing Your Program
    3. Chapter 3. Interaction
      1. 3.1 Go with the flow.
      2. 3.2 Our Good Friends, setup( ) and draw( )
      3. 3.3 Variation with the Mouse
      4. 3.4 Mouse Clicks and Key Presses
  8. Lesson 2: Everything You Need to Know
    1. Chapter 4. Variables
      1. 4.1 What is a variable?
      2. 4.2 Variable declaration and initialization
      3. 4.3 Using a variable
      4. 4.4 Many variables
      5. 4.5 System variables
      6. 4.6 Random: Variety is the spice of life.
      7. 4.7 Variable zoog
    2. Chapter 5. Conditionals
      1. 5.1 Boolean Expressions
      2. 5.2 Conditionals: If, Else, Else If
      3. 5.3 Conditionals in a Sketch
      4. 5.4 Logical Operators
      5. 5.5 Multiple Rollovers
      6. 5.6 Boolean Variables
      7. 5.7 A Bouncing Ball
      8. 5.8 Physics 101
    3. Chapter 6. Loops
      1. 6.1 What is iteration? I mean, what is iteration? Seriously, what is iteration?
      2. 6.2 “WHILE” Loop, the Only Loop You Really Need
      3. 6.3 “Exit” Conditions
      4. 6.4 “FOR” Loop
      5. 6.5 Local vs. Global Variables (AKA “Variable Scope”)
      6. 6.6 Loop Inside the Main Loop
      7. 6.7 Zoog grows arms.
  9. Lesson 3: Organization
    1. Chapter 7. Functions
      1. 7.1 Break it down
      2. 7.2 “User Defined” Functions
      3. 7.3 Defining a Function
      4. 7.4 Simple modularity
      5. 7.5 Arguments
      6. 7.6 Passing a copy
      7. 7.7 Return type
      8. 7.8 Zoog reorganization
    2. Chapter 8. Objects
      1. 8.1 I’m down with OOP.
      2. 8.2 Using an Object
      3. 8.3 Writing the Cookie Cutter
      4. 8.4 Using an Object: The Details
      5. 8.5 Putting it Together with a Tab
      6. 8.6 Constructor Arguments
      7. 8.7 Objects are data types too!
      8. 8.8 Object-Oriented Zoog
  10. Lesson 4: More of the Same
    1. Chapter 9. Arrays
      1. 9.1 Arrays, why do we care?
      2. 9.2 What is an array?
      3. 9.3 Declaring and Creating an Array
      4. 9.4 Initializing an Array
      5. 9.5 Array Operations
      6. 9.6 Simple Array Example: The Snake
      7. 9.7 Arrays of Objects
      8. 9.8 Interactive Objects
      9. 9.9 Processing’s Array Functions
      10. 9.10 One Thousand and One Zoogs
  11. Lesson 5: Putting It All Together
    1. Chapter 10. Algorithms
      1. 10.1 Where have we been? Where are we going?
      2. 10.2 Algorithm: Dance to the beat of your own drum.
      3. 10.3 From Idea to Parts
      4. 10.4 Part 1: The Catcher
      5. 10.5 Part 2: Intersection
      6. 10.6 Part 3: The Timer
      7. 10.7 Part 4: Raindrops
      8. 10.8 Integration: Puttin’ on the Ritz
      9. 10.9 Getting Ready for Act II
    2. Chapter 11. Debugging
      1. 11.1 Tip #1: Take a break.
      2. 11.2 Tip #2: Get another human being involved.
      3. 11.3 Tip #3: Simplify
      4. 11.4 Tip #4: println( ) is your friend.
    3. Chapter 12. Libraries
      1. 12.1 Libraries
      2. 12.2 Built-in Libraries
      3. 12.3 Contributed Libraries
  12. Lesson 6: The World Revolves Around You
    1. Chapter 13. Mathematics
      1. 13.1 Mathematics and Programming
      2. 13.2 Modulus
      3. 13.3 Random Numbers
      4. 13.4 Probability Review
      5. 13.5 Event Probability in Code
      6. 13.6 Perlin Noise
      7. 13.7 Angles
      8. 13.8 Trigonometry
      9. 13.9 Oscillation
      10. 13.10 Recursion
      11. 13.11 Two-Dimensional Arrays
    2. Chapter 14. Translation and Rotation (in 3D!)
      1. 14.1 The Z-Axis
      2. 14.2 P3D vs. OPENGL
      3. 14.3 Vertex Shapes
      4. 14.4 Custom 3D Shapes
      5. 14.5 Simple Rotation
      6. 14.6 Rotation Around Different Axes
      7. 14.7 Scale
      8. 14.8 The Matrix: Pushing and Popping
      9. 14.9 A Processing Solar System
  13. Lesson 7: Pixels Under a Microscope
    1. Chapter 15. Images
      1. 15.1 Getting Started with Images
      2. 15.2 Animation with an Image
      3. 15.3 My Very First Image Processing Filter
      4. 15.4 An Array of Images
      5. 15.5 Pixels, Pixels, and More Pixels
      6. 15.6 Intro to Image Processing
      7. 15.7 Our Second Image Processing Filter, Making Our Own Tint( )
      8. 15.8 Writing to Another PImage Object’s Pixels
      9. 15.9 Level II: Pixel Group Processing
      10. 15.10 Creative Visualization
    2. Chapter 16. Video
      1. 16.1 Before Processing
      2. 16.2 Live Video 101
      3. 16.3 Recorded Video
      4. 16.4 Software Mirrors
      5. 16.5 Video as Sensor, Computer Vision
      6. 16.6 Background Removal
      7. 16.7 Motion Detection
      8. 16.8 Computer Vision Libraries
      9. 16.9 The Sandbox
  14. Lesson 8: The Outside World
    1. Chapter 17. Text
      1. 17.1 Where do Strings come from?
      2. 17.2 What is a String?
      3. 17.3 Displaying Text
      4. 17.4 Text Animation
      5. 17.5 Text Mosaic
      6. 17.6 Rotating Text
      7. 17.7 Display text character by character.
    2. Chapter 18. Data Input
      1. 18.1 Manipulating Strings
      2. 18.2 Splitting and Joining
      3. 18.3 Reading and Writing Text Files
      4. 18.4 Text Parsing
      5. 18.5 Text Analysis
      6. 18.6 Asynchronous Requests
      7. 18.7 Beginner XML
      8. 18.8 Using the Processing XML Library
      9. 18.9 The Yahoo API
      10. 18.10 Sandbox
    3. Chapter 19. Data Streams
      1. 19.1 Synchronous vs. Asynchronous
      2. 19.2 Creating a Server
      3. 19.3 Creating a Client
      4. 19.4 Broadcasting
      5. 19.5 Multi-user communication, part 1: the server
      6. 19.6 Multi-user communication, part 2: the client
      7. 19.7 Multi-user communication, part 3: all together now
      8. 19.8 Serial communication
      9. 19.9 Serial communication with handshaking
      10. 19.10 Serial communication with strings
  15. Lesson 9: Making Noise
    1. Chapter 20. Sound
      1. 20.1 Really Simple Sound
      2. 20.2 Getting Started with Sonia and Minim
      3. 20.3 Basic Sound Playback
      4. 20.4 A Bit Fancier Sound Playback
      5. 20.5 Live input
      6. 20.6 Sound Thresholding
    2. Chapter 21. Exporting
      1. 21.1 Web applets
      2. 21.2 Stand-alone applications
      3. 21.3 High-resolution PDFs
      4. 21.4 Images/saveframe()
      5. 21.5 Moviemaker
  16. Lesson 10: Beyond Processing
    1. Chapter 22. Advanced Object-Oriented Programming
      1. 22.1 Encapsulation
      2. 22.2 Inheritance
      3. 22.3 An inheritance example: shapes
      4. 22.4 Polymorphism
      5. 22.5 Overloading
    2. Chapter 23. Java
      1. 23.1 Revealing the wizard
      2. 23.2 If we did not have Processing, what would our code look like?
      3. 23.3 Exploring the java API
      4. 23.4 Other useful java classes: Arraylist
      5. 23.5 Other useful java classes: rectangle
      6. 23.6 Exception (error) handling
      7. 23.7 Java outside of Processing
  17. Appendix: Common Errors
  18. Index

Product information

  • Title: Learning Processing
  • Author(s): Daniel Shiffman
  • Release date: April 2009
  • Publisher(s): Morgan Kaufmann
  • ISBN: 9780080920061