Pixel Path: my preliminary steps into generative art
was posted on 25 Feb 08 at 6:03am. it has been filed under code, i am geek and tagged with art, code, design, generated, generative art, processing.
so far it has been commented on 6 times, you can add your own if you like. you can also ping the trackback url if you want, i don't mind.
related posts
archives
categories

I first discovered Processing in the summer of 2005. I downloaded the source code, had a play around with it and decided it wasn’t going to be worth me learning it. At the time I was very much design oriented in my endeavors and although I knew vaguely what the capabilities of Processing were, it’s lack of a substantial IDE or drawing tools made it no competitor to my main focus at the time: Flash.
Rediscovery & Inspiration
Fast forward 3 years and I’m now a developer, a code junkie, a command-line ninja. Although I sometimes miss the creativity that you get with design, I still love the art of writing code. I want the excitement of motion, interaction and form but also want the challenge of writing elegant software… I’d been thinking about re-visiting processing for a long time, hopefully it would satisfy these needs. I often kept an eye on the likes of Jonathan Harris & Flight 404 to see what they were up to, and was always inspired by the cool things these guys were doing with processing + generative art in general.
It was when a guy at work, David Standen started going on about processing, and his love for it that I thought “maybe i should look at this again”. I am after all now a programmer, and Processing is a DSL around Java, so why not learn it? I downloaded the latest version and started playing around…
Enter Pixel Path
I wanted something different, I ignored “good code” and went straight for the fun and creative, something non-interactive maybe. So what to do? I’ve always been really annoyed by the fact that I can’t really draw very well and I’ve never painted a picture in my life, so I decided to try and create some software that would create gorgeous looking “things”. Generative Art.
Inspired by this post I set about creating what would later become known as “Pixel Path”. The idea was simple, to analyze a given image, pixel by pixel and map every pixel to all other pixels of the same colour. Pixels would be identified by a dot and connected by lines, hopefully creating a sense of depth, texture and form.
Version 1 - Moss
The first version is based on a macro shot of a leaf, it maps every 100th pixel to up to another 100 pixels of identical colour. (Galleries each have 5 parts, use the thumbnails to scroll through them all.)
Total Pixels: 1,296,000 | Analyzed: 12,960 | Paths: 1,296,000
Version 2 - Skin
In the second version I tweaked the algorithms to introduce more depth, points are rendered at 80% opacity and paths at 20%. The amount of pixels to be analyzed was also reduced to every 3500th, but the mapping limit increased to 1000 paths. The reference image was a macro shot of a group of feathers.
Total Pixels: 1,296,000 | Analyzed: 370 | Paths: 370,000
Version 3 - Paprika
The third version used bezier curves to draw the paths with control points offset against the difference between the reference and target pixel. Every 850th pixel was analyzed up to 100 paths. The reference pixels in this version were distinguished with near 100% opacity. The image used was that of a red rose petal.
Total Pixels: 1,296,000 | Analyzed: 1,524 | Paths: 152,400
Version 4 - Rose
For version 4 I abandoned the dots for marking pixels, and instead relied on just the paths. The bezier curves were tweaked slightly to create smoother lines and only every 250th pixel was analyzed, up to 100 paths. The reference image was another rose petal, in pink.
Total Pixels: 1,296,000 | Analyzed: 5,184 | Paths: 518,400
Version 5 - White
Version 5 was a slight departure from the norm, I inverted the canvas colour and this time decided to map the reference pixel to it’s first match, then all other matches to the next match (creating a flowing path) This version also draws two sets of paths for every match, one straight and one curved. Opacities were also massively reduced to only 5% and analyzed pixels increased to every 900th for up to 1000 paths. The first reference image was a different set of feathers and the second a forest scene.
Total Pixels: 1,296,000 | Analyzed: 1,440 | Paths: 1,440,000
Version 5 - Forest
Next Steps
- Introduce an element of randomness.
- Experiment with noise.
- Experiment with blending.
- Introduce the z-axis.
- Try using particles to generate “ink splats”.
























6 comments
add your own
Lovely new work! I too have just started with processing. The book turned up yesterday and I’m amazed at how easy it looks to get into straight away.
I love the examples you created.
Keep on keeping on!
maya
Hi maya,
thanks for the comment, i too got the book not so long ago, I’m addicted!
I’m all ready thinking about implementing craig reynolds boid’s in a new sketch and i really want to try my hand at implementing some of the rules from the code on cellular automata.
Processing is really great, it is very easy to get into, if you have previous coding skills you’ll find it easier, if not, the book is a great introduction to the basics also.
Great blog by the way, I’m a big fan of white-out text.
- craig
nice one, you’re getting some really beautiful results there.
thank you, i just had a look at you blog, some of your work is awesome!
I really dig this. I’ve recently got into Processing myself, and well, decided to recreate it. Just posted some pics up on flickr:
http://www.flickr.com/photos/warpcat/2597180052/
Imitation is the greates form of flattery, right?
The other stuff you’ve done is great too.
Cheers
Hi! Yet another imitator here! I just started learning Processing, and your work inspired me to try to recreate the Pixel Path algorithm. The result didn’t turn out as beautiful as yours, but I definitely learned a lot. Thanks!
2 pings