It was recently brought to my attention that my old wooly paths definition no longer works with the latest version of Grasshopper (0.9+) so I thought I'd take the opportunity to include some improvements in the update which you can grab here.
For one, paths now have bending resistance which helps considerably avoid tangling. Attractive forces between threads have also been reworked in an effort to keep positive feedback in check. Hopefully explosive spaghetti is a problem of the past. If anyone stumbles upon any bugs let me know and I'll do my best to exterminate.
Physarum polycephalum is a type of slime mould with a certain knack for graph theory. Like most of us, the organism spends the majority of its life searching for something to eat. Unlike us however, it has the ability to exploit multiple food sources simultaneously. Upon discovering a number of edible options within it's environment, the Physarum constructs remarkably efficient transport networks between them as a means of distributing nutrients amongst its many nuclei. By way of this special talent, the brainless amoeba has managed to offer up some pointers to infrastructure engineers in recent years.
It's misleading to talk about Physarum as a singular entity however. The mould's apparent design intelligence isn't the product of a singular higher level brain. Rather it is an ecological property of many lower level decision-making entities acting in parallel. It is a classic example of decentralized problem solving. The Physarum's infrastructure emerges from local interactions amongst it's nuclei population - none of which have any idea of the global state of the system they belong to. While the specific details of these local interactions are beyond my limited knowledge of biology, as it turns out modelling them isn't so different from the chemotaxis based multi-agent systems that I've been playing with recently.
The above is based on a multi-agent approximation of Physarum network formation put forward by Jeff Jones in his paper "Characteristics of Pattern Formation and Evolution in Approximations of Physarum Transport Networks". What is most interesting about Jones's approach is the complexity differential between the agent behaviors and their emergent output. Once again agent interaction is strictly indirect. They communicate only through detection and deposition of "pheromone" gradients within their shared environment. The decision-making routines themselves are surprisingly discrete - each agent samples in 3 forward biased locations and picks only the one with the highest pheromone concentration to move towards. With a large enough population of agents however, this behaviour produces self-minimizing networks similar to those seen amongst the organism they aim to emulate.
In implementing it myself in Processing, I've stayed mostly true to the source material. Where I did deviate a bit was in making the agent's sampling routine less discrete. Each of the 3 pheromone samples play into a weighted vector sum that determines the agent's new heading. I also added a foraging behaviour where each agent seeks out regions of low pheromone concentration rather than high (00:09).
In an effort to bring some of the geometry I've been playing with into the realm of the constructable (or at least closer to it), I've been exploring the decomposition of freeform meshes into developable strips. In the example below, an initial isosurface is extracted from a reaction-diffusion simulation that used pheromone concentrations from previous posts as a starting condition. This mesh is then decomposed by marching across each of its faces based on a simple scoring system. At each step, the normal of the current face is compared to that of its neighbours. This deviation is combined with deviation from a guide vector to produce the overall score. The lowest score is followed until either the current strip exceeds a defined maximum length or the mesh simply runs out of faces. The process can also be short circuited if no neighbours fall within an acceptable deviation.
The decomposition was run twice on the above mesh. The two passes used perpendicular guide vectors producing a weft layer and a warp layer. Strips under a certain length were left out to produce openings in the skin.
In continuing to look at the idea of chemotaxis among agent populations, I added a third dimension to the pheromone based simulation from earlier. Taking a similar approach, two populations of agents compete for space in a finite volume. Each population attempts to drag the pheromone concentration towards a desired level to which it is also attracted. Eventually the populations negotiate respective territories producing similar results to some previous space partitioning studies. Below is a 3d print of isosurfaces extracted from the resulting pheromone cloud.
Also, on a related note, here's a look at the surfacing in action on a different pheromone cloud.
A while back I stumbled upon a neat Processing sketch that dealt with the production of electromagnetic field lines in an unusual way (credit to bitcraft). In the past I've approached this sort of thing through vector field integration, where streamlines are represented as paths of moving particles. The sketch above takes a different approach however. Each pixel is given a scalar value based on the weighted angle sum of vectors coming from each charge. This field can then be contoured however you like. Stream lines, for example, can be extracted by isolating pixels that lie on given thresholds. The fun thing about this approach is that when translated to 3d it produces stream surfaces instead of stream lines.