Sunday, 12 February 2012

Phero Print

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.




Platforms: Processing, C#, Grasshopper, Rhino

Saturday, 21 January 2012

Stream Surf

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. 




Platforms: C#, Grasshopper, Rhino

Friday, 23 December 2011

Voromnomnoi

As a rule of thumb, things are better when edible. With that in mind and the holiday season in full swing it seems like the appropriate time for a snickerdoodle 2d Voronoi diagram. 

Baking credit to Gina Gallaugher

If you're feeling more three dimensional try out some monkey bread instead. Happy holidays.

Thursday, 20 October 2011

Smells Like Stigmergy

Taking a few cues from ant colonies, I've been playing with the construction of vector fields from agent based pheromone distribution. Instead of agents receiving distance based forces from neighbours directly, forces are derived from gradients in the pheromone field they leave behind. In other words, each agent 'sniffs' for a desired pheromone value within a scalar field and moves towards it. Because of the indirect nature of agent-to-agent interaction, simulating large populations becomes much less computationally expensive.

Below is an example of the interaction between two populations of 50,000 agents. One seeks out a target and contributes to the pheromone puddle (cyan) while the other gets in the way and tries to clean up the mess (magenta).





Platforms: Processing

Tuesday, 30 August 2011

Bifur Moire

Lately, apart from not posting enough, I've been experimenting with automata based scalar fields. Hopefully they'll play into the development of environmental vector fields within the agent/physics class library when I get a bit more time. For now though, I've been tinkering with them in isolation. Here's a quick processing sketch of some of the more interesting results. 


What's going on above is a diffusion driven bifurcation. From a random starting value between 0 and 1, each cell iteratively adds the average delta between itself and each of its neighbours. The two distinct regions are produced by dragging each value towards 0 or 1 depending on its relationship to a set bifurcation value, in this case 0.5. To visualize how values are being exchanged, the field is contoured, producing moire patterning in steep regions.

Platforms: Processing