Loopnova

Some initial experiments with simulating slime mold Physarum polycephalum - from very simple mechanisms the mold is able to efficiently scavenge for and transport food through emergent networks of paths.

The algorithm I used is heavily influenced by the one proposed by Jeff Jones and inspired by the blog piece by Sage Jenson.



My interest was piqued from reading Sage’s post on Saturday evening, I proceeded to read Jeff’s paper to understanding the algorithm before going to bed. Sunday I dived right into implementing it in Golang without any non-core libraries other than my own*. To my astonishment, after a few hours coding and despite having not written any tests** or run partial code at any point during the process, the program built and ran first time, producing some emerging patterns!


Loopnova

Loopnova

Loopnova


These images/videos are from some initial simulations playing around with the “sensor offset”, and with the periodic nature of the simulations. There is a lot more space to experiment though ranging from

  • fiddling with other parameters
  • tweaking the underlying algorithm
  • combining multiple systems that interact (e.g. repel each other)
  • initial chemotrail distribution (e.g. perlin noise)

I expect I will play with these in the future, and post them here if any are fruitful!


Loopnova

Loopnova

Loopnova



*The only place it would have been particularly useful would have been implementing the diffusion algorithm, and there are some libraries out there that could have done this on an Image (like GIFT), but in the end I decided to implement my own custom data structure for the trail map which I thought would be more efficient. This meant implementing my own mean filter for it. Also, other ones I had seen didn’t seem to support wrapping pixels around at the edges, a specific feature I was interested in implementing.

**Terrible admission I know! Impatience got the better of me. That said, they way I see it, code for generative art is a very different beast to most code: firstly, it’s not doing anything important that would need a high quality bar, and secondly “happy accidents” are quite important in generative art, so actually I don’t want to be overly diligent. Like most things, the right answer probably lies somewhere in the middle - test the low level pieces to save yourself time on tearing your hair out looking for bugs, don’t test the high level composition to allow for that margin for error (and speed of experimentation).