14.4.08

Drawing test

...two posts in one day? I must be busy. : D

I've been playing around with python, pygame, and cairo (through pycairo) the last few days. I needed an environment to quickly prototype ideas (after discarding processing for various reasons). With the above mentioned combination I can quickly whip up interactive vector-graphic driven systems. The following video demonstrates a trivial algorithm for generating shapes that takes two parameters which are changed over time. It's nothing special but took a trivial amount of time to implement with my new toys. Something interesting to look out for are the emergent shapes and waves as the parameters are changed.

4 comments:

Mitchell said...

hey Ben, tell us about your reasons for not using Processing? it would seem to be the obvious choice for vector grfx...

eigenbom said...

Mitchell,

I really haven't used Processing in any depth, but afaict its vector graphics routines are fairly primitive compared to devoted libraries like Cairo, Amanith or AGG.

I don't really want to go into a Processing rant, but when I delved into the source and discovered that their "Perlin noise" wasn't Perlin noise, it made me start looking elsewhere.

Python makes prototyping a lot easier due to the higher level constructs of the language, and I can plug in various other specific libraries (like Cairo) quite easily. When speed becomes an issue I can start replacing the critical components with optimised C modules.

The ability to generate applets is the only major advantage I can see when using Processing. (You can generate compiled python bytecode and wrap up executables quite easily but users have to leave their browser ;)).

Cheers mate.

Jon McCormack said...

Hi Ben,
Look, I am reading your blog.
Stop slagging off processing - I know you really like it :-)

Jon.

eigenbom said...

It's great Jon. But not as great as hammering nails into my eyes...