A day in the life of Danny D'Amours

ZipDecode Visualization and the Processing Language

I “StumbledUpon” a neat little visualization program called ZipDecode from Ben Fry from MIT. This program is quite a slick visualization demo which shows geographic distribution of zip codes across the USA.

One interesting thing which I discovered while examining the program is that it was created using a language called Processing. This language is designed to allow users to display and work with images and animations. Processing is built on Java and it thus multi-platform. Processing programs are translated into Java and run on the JVM.

Let’s examine a code example of drawing primitive shapes

size(200, 200);
smooth();
background(0);
noStroke();
fill(226);
triangle(10, 10, 10, 200, 45, 200);
rect(45, 45, 35, 35);
quad(105, 10, 120, 10, 120, 200, 80, 200);
ellipse(140, 80, 40, 40);
triangle(160, 10, 195, 200, 160, 200);

The syntax reminds me of JavaFX which Sun has been pushing lately. Since Processing has been around for at least 3 or 4 years, I would imagine that it is quite a bit more mature and developed than JavaFX. There is even a mobile version of Processing that creates programs (or sketches in Processing parlance) for J2ME phones.

Sounds a lot like JavaFX to me….

Related Posts:

August 16th, 2007 Posted by Danny D'Amours | Java, Tech | no comments

No Comments »

No comments yet.

Leave a comment

css.php