The language 'processing'
Processing is a programming language and environment built for the electronic arts and visual design communities. It is created to teach fundamentals of computer programming within a visual context and to serve as a software sketchbook. It is used by students, artists, designers, architects, and researchers for learning, prototyping, and production.
Ben Fry and Casey Reas.
Processing is a Object oriented language with a specific domain of multimedia.
Programs are translated in to Java, compiled and executed seamless in the simple
but effective Development environment. Once written, an application can be exported as
a Java applet for inclusion in a website. All this works exceptionally smoothly once the IDE is installed. The speed of interaction is really marvellous.
processsing.org Processing Home site at MIT
There is a a wonderful collection on the processing.org site and these come with the download. Here is a taster.
|Move the mouse over the image.|
|Code||Play with this cube
|Grab the top bar and move it
Here is a Processing implementation of a generalisation of Conway's Game of life automata
in which the rule can be set or selected at random.
- Download from processing.org. Because it is still in alpha - a very cautious alfa I would say since it seems very stable - they email you a link to the download on request.
- You need an version of Quicktime which provides a Java interface - OK on MAc OS X but Windows users need a down load - see the readme file or this from the discussion log
Advice on installing Quicktime 6.1
- You will also need Java 1.4 .
Notes on Processing
- Strongly typed, so variables must be declared before use.
- Editor is language aware, so is able to do helpful things like
- highlight the matching bracket
- color reserved words, functions and defined values
- beautify the code by cleaning up indents
- reserve words linked to reference manual (although this is not quite complete)
- Although a pre-compiler, and hence some errors pop through from the Java compiler, its diagnosics are very good. It even advises on a near match to a missing identifier, and in possible use of an uninitialised variable.
- Lightweight class definition syntax
- Classes can be defined, and objects instantiated, but the bulk of the code is
straightforward procedural code - with lots of practice in
- iteration, selection
- arithmetic calculation
- mapping - e.g. from one coordinate system to another
- Very powerful set of graphics primitives for line graphics, 2-d and 3-d transformations, image and video manipulationion. RGB and HSB color models.
Interaction from mouse and keyboard and serial port. Extensive font libary
- Very responsive - edit compile execute cycle is very short (at least on my 2Ghz machine) so mistakes in syntax or algorithm are seen very quickly
- Visualisation of loops and variables - graphic is the program function, so programs are functionally the same if they look the same.
- Can break - takes all the processor it can when doing hard computation such as video processing.
- No infinite loop detection - easy to get into one but generally requires reboot to stop.
- Some of the examples are poorly written
Could be either
- No mixed arithmetic - so in an integer expression, each intermediate value is an
integer so x / y * z is different from x* z / y
- Needs ability with some basic mathematics and geometry - as all computational graphics does