Archive for May, 2008

SVG in Processing

Saturday, May 31st, 2008

The new version of Processing includes better XML manipulation and a way to load an SVG from memory. Thus, new avenues are opened for incorporating drawings into Processing sketches.

Here are some first results. The XML parser / SVG renderer is efficient enough to support high framerates.


Processing sketches posted

Wednesday, May 28th, 2008


Source code, originally uploaded by chazmatazz.

I have posted some processing sketches in the processing.org flickr group. I create a random set of RGB colors and then place them in the correct location in a 3D RGB colorspace (so the coordinate and the colors are the same). The user then uses the mouse to move the colorspace around the window, creating a drawing. The source code is only 48 lines.

Attention actionscript SVG googlers!

Wednesday, May 28th, 2008

Not much to report here, but I noticed by looking at google analytics for my blog that people are googling for “actionscript svg” and finding my blog. I really like my actionscript SVG project, I think that manipulating SVG’s at runtime is something that is really missing from Adobe’s current Flash toolkit.

I recently switched to doing my development in Processing, and I am using their Candy SVG library, which works a bit better than mine. So while I think I will do a bit more work on the actionscript SVG library, I would be more than happy to pass off what I have to some other developer. Any takers?

Dirtiest US Power Plants

Sunday, May 25th, 2008

I have started a series on the dirtiest power plants in the US, using EPA data. Each map shows each power plant in the US. Small white dots are small power plants generating less than 2 million Megawatt-hours per year (MWh/year). Large white dots are large power plants that generate more than 2 million MWh/year. The black dots are large power plants that are in the top 50 CO2 power plant polluters, top 50 power plant NOx polluters, and top 50 power plant SO2 polluters. This was done in Processing. For more information see http://www.dirtykilowatts.org/

Map of Superfund sites

Tuesday, May 20th, 2008

I created a map of Superfund sites in Processing. it’s a PDF. Strewth!

ExtJS rocks

Monday, May 12th, 2008

At the end of last year I was blogging about ExtJS a bit. I have just completed a financial services app in ExtJS, and I have to say that ExtJS ROCKS. It’s an MVC application written with the model written in Java and made available through a SOAP API (I know we used java persistence, but I didn’t write the model so I can’t give you details). The Controller (which I did write) is written in PHP and uses the WSDLInterpreter library to generate PHP stubs. The view I wrote in ExtJS and communicates with the controller via JSON. There’s almost no HTML, and all the javascript is statically generated (the only good way to do it). Thanks go to ExtJS for not only an awesome widget toolkit but also the means to have a really clean MVC implementation.

Using JSDoc for PHP documentation

Monday, May 12th, 2008

It seems that JSDoc is easier to use than PhpDocumentor or Doxygen, especially when using custom tags. I just came up with the stellar idea of using JSDoc to generate PHP documentation. PHP’s reflection API includes a way to read the JavaDoc-style comments on each function. What I will do is take these JavaDoc-style comments and make fake JavaScript functions to go with them, and then parse the new ‘JavaScript’ file in JSDoc.

I’ll provide details and tell you how it works in a later post.