I'll also encourage you to post a link to the source, even if it's not the cleanest code. I've been thinking about trying to make something like this for a while, but using larger-scale cells from a side-on view to simulate plant growth. (To that end, I'm currently reading The Algorithmic Beauty of Plants[1], which performs its generation via L-systems.) I'd love to see how you've put this system together.
[1] http://algorithmicbotany.org/papers/#abop