Processing #1

Processing is an open sourced programming language based on Java, with the main purpose of teaching programming fundamentals in a visual context – making it the tool of choice for a lot of new media art, electronic arts, and other visual design projects.

I installed it on my home machine, running Fedora Linux, as processing is cross-platform, however I did need to run the script from its home directory in order to run, as a native .rpm file is not supplied.

I quickly learned the basic syntax of programming after a while of playing with the software and looking at tutorials etc, as I initially had no experience. I saw in practice how results were achieved through use of functions with parameters, defining and using variables to control outcomes of the code as well as looking at responsive coding in this scenario, since processing is a visual language I ensured that code written would work regardless of the window size, for example.

To start, I drew a rectangle using the default function “rect” with parameters to define its size. I could see how variables became relevant when doing this by defining some and passing them in the “rect” function to change the parameters of the rectangle. Additionally I looked at “void setup();” and “void draw();” – what seemed to be the fundamental element of beginning to animate in processing. Code in “void setup();” was essentially the setup for the sketch, as per the name, and would include basics such as the framerate, background colour, canvas size, options for anti-aliasing etc, and would not re-render every frame as the animation played. Code in “void draw();” would re-render for each frame, the speed of which was defined in setup by the “frameRate();” function. I set this at 30 initially when experimenting, as is commonly used for animation and TV in Europe, however I later changed this to 60fps when drawing objects from the mouse position as they were not keeping up if I moved the mouse quickly. This is the rate commonly used in video games, particularly PC.

Processing can take data from a variety of sources and parse it in various ways, such as camera feeds, heat sensors, GPS, accelerometers etc. My plans for continuing to develop my knowledge in processing are to create some visualizer-type sketches, perhaps for accompaniment to music, and eventually projects based on camera feeds and similar.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s