Monday, October 20, 2008

Processing Tips

Adding Packages

You will see that a number of pre-packaged examples come with the Processing installation, available from the menu File_Examples. However, a number of people have developed custom packages. To add them, you need to add a "libraries" directory to your Sketchbook directory. The JAR file you add should be contained in a library directory. If the custom package does not then appear in File_Sketchbook_libraries, try re-booting your computer.

"unexpected token: void"

I ran into this compiler error when writing a method that I expected to execute before the void setup() method. However, Java is not a sequential language. In a normal Java application, you might not be aware of this because sequential execution is guaranteed by a constructor or main method. But here, you need to place all sequential processing within the void setup() method. An error regarding possible non initialization of a variable, where this is entrusted to another independent method, may have a similar cause.

Adding mathematical and other symbols appearing in your code

A problem that I came across is that html may not directly render mathematical and other symbols. A good resource explaining how to do this can be found at:

http://comers.citadel.edu/math_sym2005.htm#arrows

I will add more general issues/problems as I come across them.

Timetable

OK, I can confirm that I will do Chunks 74 and 76.

Timetable

I hope to have the Greenberg book in a couple of weeks, when it should be easier to estimate the work involoved. In the meantime, I have downloaded the Processing IDE and started experimenting with some ideas. I think my initial focus will be on developing the required programs. While doing so, I will document the issues/problems I came across.

Tentatively, I will aim to complete the programs by year-end and complete the write-up a month or so after.

As I have already come across some issues that could be of interest to others, I will do a post called "Processing Tips" to document them.

I will also post drafts of the Java/Processing code I am developing as this begins to mature.

Friday, October 17, 2008

Introduction

This Blog has been created to document my participation in a collaborative book venture that aims to teach Computer Art using Processing - a Java IDE.

The sponsors of the project are the
Open University and specifically Prof. Darrel Ince of The Computing Department.

Other collaborative authors are students and alumni of the Open University and their contributions are hosted at the main blog site.

Royalties from the book will go to an Open University charity fund.

The project's timeframe is November 2008/April 2009.

My background, pertinent to this venture, is that I am an Open University alumnus (B.Sc. Computing - 2005) and also hold a M.Sc. in Geographical Information Science (2007)
Birkbeck College, University of London. The study of Sun Microsystem's Java software language was a significant component of my academic studies culminating in its use in developing a Java mapping platform plug-in for hydrology generalization - the subject of my Master's dissertation (see http://www.unigis.org/gisruk_2008/proceedings/heap.pdf).

Tentatively, I will contribute the following chunks of the book:

CHUNK 74
TITLE Pixels
DESCRIPTION So far we have been looking at Pixels, now we will look at bit mapped images. This is the introduction.

OUTCOMES

  • Be able to understand the difference between bit-mapped and vector graphics.
  • Be able to use the pixel functions detailed in this part of the book.
  • Be able to develop a program that uses pixels of around 120 lines of code.
CHUNK 76
TITLE Loading and tiling images.
DESCRIPTION This is the start of the part of the book that deals with image manipulation. It shows you how load images and set and get the pixels in an image.


OUTCOMES

  • Be able to use program facilities to load an image.
  • Be able to use set and get functions to manipulate an image.
  • Be able to develop programs of no more than 120 lines which use the facilities in the Greenberg fragment.

In my next post, I will:

  • Confirm the chunks I will be authoring.
  • Rough-out a plan of execution for this work.

Followers