Friday, 27 April 2012

MeshStrip

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.



Platforms: Processing, C#, Grasshopper, Rhino

Sunday, 12 February 2012

PheroPrint

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

StreamSurf

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

BifurMoire

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

Tuesday, 21 June 2011

Spatial Binning

Recently, development of the class library has focused on optimizing interactions between large populations of particles. Typically each particle is forced to perform a distance check between itself and all other particles in the system. From there it collects forces which are generally some function of this distance. In this case, computation time is proportional to the square of the particle count making large populations really chug. Enter spatial binning.



agent_populations from Davideo Reeves on Vimeo.

When forces are only active within a finite range (ie. boids, packing etc.) checking every particle isn't really necessary. By breaking down the simulation space into 3 dimensional domains or "bins", particles can perform their search by only checking the bins that sit within a local influence. Generally the more local the search, the more effective the optimization, assuming the bin size isn't too small or too large. The video above has 10000 agents interacting at about 15 fps. Prior to binning, just under 1000 agents were running at about the same speed. Excelsior.

Platforms: C#, Grasshopper, Rhino