The Processing Tutorial

Prof. Jean-Francois Chamberland

Texas A&M University

Prof. Gregory Huff

Texas A&M University

Table of Contents

Design and Prototyping
Installing the Processing Software
A Tiny Processing Tutorial

Design and Prototyping

In the present context, Processing refers to a community-driven project aimed at promoting software literacy within the visual arts and beyond. The original motivation for this project was to develop tools to help teach the fundamentals of programming using computer graphics. While Processing has evolved into a platform capable of producing professional work, it also remains a fantastic language and environment to learn programming concepts. One of the important aspect of this project is its thriving community of contributors who share programs and answer questions. This is an invaluable resource for people engaged in self-directed learning.

Installing the Processing Software

The Processing software runs on Windows, Mac OS, and GNU/Linux personal computers. It is available on the Processing website. Select the link that corresponds to your operating system to initiate the download of the appropriate program. Once the data transfer is complete, you need to perform the following straightforward steps to finish the installation. Note that these steps depend on your operating system.

  • Windows: Double-click the zip file and drag the Processing icon to the desired location (Program Files, Desktop, etc.). From the selected folder, double-click processing.exe to open the development environment.
  • Mac OS: Drag the Processing icon from the disk image to the desired location (Applications, Desktop, etc.). From this folder, double-click the Processing icon to launch the program.
  • GNU/Linux: The downloaded GNU/Linux version is a .tar.gz file. Using the terminal, move the compressed item to the desired location. Then, perform the command tar xvfz processing-*.tgz. This will create a directory that contains Processing. Change directory (cd) to the newly created folder, then launch the application with the command ./processing.

If you completed this procedure without encountering hurdles: congratulations, you have successfully installed the Processing software! Otherwise, you may want to consult the Processing troubleshooting page. Given the vast array of hardware platforms and operating system versions, it is heavy technological gymnastics to try to have the installation process run smoothly for everyone. With luck, patience and discipline, you should be able to eventually get a working installation. Your next step is to get familiar with the language and start experimenting.

A Tiny Processing Tutorial

A key pedagogical feature of Processing is its simplicity by design. The interface is easy to understand and navigate. This enables users to focus on learning programming concepts, rather than spending time getting familiar with an intricate graphical environment. The basic layout of the application contains a development window, where a computer program is created, and a display window that showcases the results. The editing window includes a toolbar with a predetermined set of actions, a text editor, a message area and a console. The text editor plays a central role in the Processing environment. This is where computer code is written, changed and manipulated. The Processing editor supports multiple tabs, a feature which is especially useful for large projects. Below the editor is a message area and a console. The message area is employed for one line messages, whereas the console provides additional technical details whenever appropriate. The standard Processing environment appears in Figure 1, “The Processing Environment”.

Figure 1. The Processing Environment

The Processing Environment


The basic tasks that compose the toolbar are fairly straightforward and quite useful. Again, the toolbar is a testament to the power and functionality of a simple interface, especially in the context of a learning environment. There are a total of six functions in the standard Processing layout; they are listed below.

Run
The Run command will cause Processing to compile your code and, if successful, it will launch a display window that depicts its output.
Stop
Clicking Stop will halt the execution of a running sketch and close the corresponding display window.
New
The New command allows you to create a new sketch by clearing the content of the text editor. Holding down the Shift key while performing this action will open up a new editing window, instead of replacing the content of the current one.
Open
The Open button can be employed to retrieve an existing sketch that was previously saved on the computer. As before, using the Shift command will open the sketch in a new editor window.
Save
The quintessential Save button enables you to save your work quickly and easily. This action, of course, should be performed frequently.
Export
The last button, Export, will bundle your sketch into a Java archive (JAR) file, a suitable format to distribute your software with others. Alternatively, you can also share your sketch as an executable file by pressing the Shift key while clicking the Export button. In this latter case, you will be asked to choose a destination platform for your application.

We note that these actions, including the Shift-key variants, will be indicated next to the toolbar when hovering over the respective buttons. Furthermore, the application menu can also be used to navigate through these various options. Going through an example is a good way to become familiar with this development environment.

The Processing website hosts several tutorials about the language and its default development environment. In fact, our brief introduction to Processing is a distilled version of the most basic tutorials. Another essential tool is the reference guide for Processing. Together, these two resources form an excellent starting point to begin your programming journey. It is worth noting that Processing was designed, partly, as a point of transition to more advanced programming languages like Java or C++. As such, its syntax is a simplified version of Java and, consequently, it should be somewhat familiar to people who already have experience with either of these two languages.