Processing Basics

Processing was originally created to enable nonprogrammers to make digital artworks. It is a java application that is an open source tool designed by Casey Reas and Ben Fry from MIT. You can downoad it from http://processing.org/download/.

Processing includes

Because Processing runs using Java, it can do almost anything Java can do.You can use it to read and write data, work with images, video and sound, draw in two or three dimensions, create artificial intelligence, and simulate physics.

The Application Interface




Processing uses a language specifically designed to generate and modify images. It allows you to write Java programs with much simpler code. While it you can structure the code in a function-based (procedural), non–object-oriented style, once the code is compiled, the output is converted to Java class files— indistinguishable from any other Java program—and the class files are interpreted within the Java Virtual Machine as the program runs.

Processing programs are created from instructions known as commands. A group of commands together is the source code. When you tell Processing to run, your computer looks at the source code and carries out the commands—drawing lines, playing sounds and doing whatever else you've told it to do. This is a process not unlike giving someone written instructions and making them follow those instructions to the letter.

In the Processing environment, you edit your source code (the list of commands) in the main window and then give it to the computer to run by pressing the run icon.

Processing is an integrated development environment(IDE). The IDE is simple to work with. There are three modes of working, allowing coders, as they increase their programming literacy, to move from Processing's simplified procedural approach, to a hybrid approach that uses some more-advanced programming constructs, to ultimately working in pure Java—all in the same IDE.



Below are the descriptions of the six control buttons:
The run button is the same as in Director and Flash. Press this to see your code execute as a program. Alternatively you can type ⌘+R.

Pressing ⌘+SHIFT+R creates a full-screen display of your executing sketch. The sketch window is centered against a neutral background. You can stop the display by selecting the Stop command in the lowerleft corner of the screen, or by pressing the Esc key.
The stop button is the same as in Director and Flash. Press this to see your program stop executing.
Creates a new file. Processing calls them sketches. You can even call them applets, programs, or interactive pieces. Director and Flash call them movies.Alternatively type ⌘+N.
Open a pre-existing sketch. A menu will pop up and you can choose from your own collection, saved in the special Processing sketch folder which I will show you later. You can also choose from a wide variety of example sketches by famous new media designer/artists, in order to learn from them and use them as a code reference. Alternatively type ⌘+O.
Save the current sketch into the Processing sketches folder. Alternatively type ⌘+S.

If you want to give the sketch a name other than the current date, you can choose save As from the File menu. Alternatively type ⌘+SHIFT+S.
Export the current sketch into the Processing sketches folder - this time as a Java applet - complete with its very own HTML file. Alternatively type ⌘+E.

To Export Application press ⌘+SHIFT+E. This allows you to export your sketch as a stand-alone, platform-specific executable application. Export Application generates an entire directory structure (in this case, actually three separate directories) with all the required files to launch an application under Linux, OS X, and Windows.

Other useful information