Wednesday, September 24, 2008

Stochastic LSystems

I don't have much of an excuse for not working on this poor project and it's withering blog.  Work's gotten really busy but also I've gotten interested in a few other side projects (I want to build myself a monome & I want to do these Wii hacks)... I'm hoping to bring the new stuff into this project somehow so that it doesn't call social welfare on me for neglect... and if it does I hope it doesn't walk into another door or fall down the stairs again.

A very simple change to where I left off was to introduce a bit of randomness to the L-System so that not all plants look the same. The only difference between a normal L-System and a Stochastic one is that with the stochastic one there's a certain probability of each production rule being applied.  So now the plants appear in all sorts of shapes and sizes but still plant-like:

stochasticmedweed2 stochasticmedweed stochasticbigweed stocasticsmallweed

In order to show the 3D-ness of them all I arranged a few plants in a grid and tried to record a fly-about.  Unfortunately it wasn't smooth at all (I've only a track-pad - I'll get a mouse soon) so I put a bit of velocity into the camera movements so that the camera keeps going whatever direction I pushed in. I tried to move about randomly in time with whatever music I had on in the background.  It's hard to describe but it was really really fun - I was terrible at it and messed up so many takes spinning out of control into yellowness.

I got a couple of decent takes (relatively speaking), but when I try to compress it for youtube it turns out all jerky and crappy so I might give it another bash tomorrow and update this post.