Preface

We created Processing to make programming interactive graphics easier. We were frustrated with how difficult it was to write this type of software with the programming languages we usually used (C++ and Java) and were inspired by how simple it was to write interesting programs with the languages of our childhood (Logo and BASIC). We were most influenced by Design By Numbers (DBN), a language created by our research advisor, John Maeda, which we were maintaining and teaching at the time.

Processing was born in spring 2001 as a brainstorming session on a sheet of paper. Our goal was to make a way to sketch (prototype) the type of software we were working on, which was almost always full-screen and interactive. We were searching for a better way to test our ideas easily in code, rather than just talking about them or spending too much time programming them in C++. Our other goal was to make a language for teaching design and art students how to program and to give more technical students an easier way to work with graphics. The combination is a positive departure from the way programming is usually taught. We begin by focusing on graphics and interaction rather than on data structures and text console output.

Processing experienced a long childhood; it was alpha software from August 2002 to April 2005 and then public beta software until November 2008. During this time, it was used continuously in classrooms and by thousands of people around the world. The language, software environment, and pedagogy around the project were revised continuously during this time. Many of our original decisions about the language were reinforced and many were changed. We developed a system of software extensions, called libraries, that have allowed people to expand Processing into many unforeseen and amazing directions. (There are now over 100 libraries.) On November 29, 2008, we launched the 1.0 version of the software. After seven years of work, the 1.0 launch signified stability for the language.

Now, nine years after its origin, Processing has grown beyond its original goals, and we've learned how it can be useful in other contexts. Accordingly, this book is written for a new audience—casual programmers, hobbyists, and anyone who wants to explore what Processing can do without getting lost in the details of a huge textbook. We hope you'll have fun and be inspired to continue programming. This book is just the start.

While we (Casey and Ben) have been guiding the Processing ship through the waters for the last nine years, we can't overstate that Processing is a community effort. From writing libraries that extend the software to posting code online and helping others learn, the community of people who use Processing has pushed it far beyond its initial conception. Without this group effort, Processing would not be what it is today.

How This Book Is Organized

The chapters in this book are organized as follows:

  • Chapter 1: Learn about Processing.

  • Chapter 2: Create your first Processing program.

  • Chapter 3: Define and draw simple shapes.

  • Chapter 4: Store, modify, and reuse data.

  • Chapter 5: Control and influence programs with the mouse and the keyboard.

  • Chapter 6: Load and display media including images, fonts, and vector files.

  • Chapter 7: Move and choreograph shapes.

  • Chapter 8: Build new code modules.

  • Chapter 9: Create code modules that combine variables and functions.

  • Chapter 10: Simplify working with lists of variables.

  • Chapter 11: Learn about 3D, image export, and reading data from an Arduino board.

Who This Book Is For

This book is written for people who want a casual and concise introduction to computer programming, who want to create images and simple interactive programs. It's for people who want a jump start on understanding the thousands of free Processing code examples and reference materials available online. Getting Started with Processing is not a programming textbook; as the title suggests, it will get you started. It's for teenagers, hobbyists, grandparents, and everyone in between.

This book is also appropriate for people with programming experience who want to learn the basics of interactive computer graphics. Getting Started with Processing contains techniques that can be applied to creating games, animation, and interfaces.

Conventions Used in This Book

The following typographical conventions are used in this book:

  • Italic: Used to indicate new terms and filenames, as well as within paragraphs to refer to program elements such as variable or function names, data types, and keywords.

  • Constant width: Used for program listings.

Note

This type of paragraph signifies a general note.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product's documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: "Getting Started with Processing, by Casey Reas and Ben Fry. Copyright 2010 Casey Reas and Ben Fry, 978-1-449-37980-3."

If you feel your use of code examples falls outside fair use or the permission given here, feel free to contact us at .

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O'Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:

To comment or ask technical questions about this book, send email to:

For more information about our books, conferences, Resource Centers, and the O'Reilly Network, see our website at:

Safari® Books Online

Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.

With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.

O'Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O'Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.

Acknowledgments

We thank Brian Jepson for his great energy, support, and insight. Nancy Kotary, Rachel Monaghan, and Sumita Mukherji gracefully carried the book to the finish line.

Tom Sgouros made a thorough edit of the book and David Humphrey provided an insightful technical review.

We can't imagine this book without Massimo Banzi's Getting Started with Arduino (O'Reilly). Massimo's excellent book is the prototype.

A small group of individuals has, for years, contributed essential time and energy to Processing. We thank Florian Jenett for his web hacking and excellent design ability, Andreas Schlegel for creating the infrastructure for building and documenting contributed libraries, and Dan Shiffman for writing amazing examples and managing the online tutorials. Over time, many others have contributed to the Processing software itself, among them Karsten Schmidt, Eric Jordan, and Jonathan Feinberg. The work of the Discourse forum administrators PhiLho, Cedric, and antiplastik is crucial for keeping the discussion running.

We're amazed by the incredible work of the individuals who write libraries and contribute their work to the community. Thank you to all! A special notice is deserved for Andres Colubri's GLGraphics and GSVideo libraries, Damien Di Fede's Minim sound library, and Karsten Schmidt's extensive and inspiring toxiclibs.

The Processing 1.0 release was supported by Miami University and Oblong Industries. The Armstrong Institute for Interactive Media Studies at Miami University funded the Oxford Project, a series of Processing development workshops. These workshops were made possible through the hard work of Ira Greenberg. These four-day meetings in Oxford, Ohio, and Pittsburgh, Pennsylvania, enabled the November 2008 launch of Processing 1.0. Oblong Industries funded Ben Fry to develop Processing during summer 2008; this was essential to the release.

This book grew out of teaching with Processing at UCLA. Chandler McWilliams has been instrumental in defining these classes. Casey thanks the undergraduate students in the Department of Design Media Arts at UCLA for their energy and enthusiasm. His teaching assistants have been great collaborators in defining how Processing is taught. Hats off to Tatsuya Saito, John Houck, Tyler Adams, Aaron Siegel, Casey Alt, Andres Colubri, Michael Kontopoulos, David Elliot, Christo Allegra, Pete Hawkes, and Lauren McCarthy.

OpenProcessing has emerged as the place to share open source Processing code. We thank Sinan Ascioglu for this amazing community resource.

Processing.js is an exciting future for Processing and the open Web. Three cheers for John Resig, Al MacDonald, David Humphrey, and the Seneca College's Centre for Development of Open Technology (CDOT), Robert O'Rourke, and the Mozilla Foundation.

Through founding the Aesthetics and Computation Group (1996–2002) at the MIT Media Lab, John Maeda made all of this possible.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.172.38