Platforms: C#, Grasshopper, Rhino
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.
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
Platforms: C#, Grasshopper, Rhino
A Wooly Example
I've been getting some requests for wooly paths source code for the past few months so I decided to clean up an early version of it in VB.net and hand it over to the internet. Grab it here.
I've simplified it a bit in an effort to keep the code clear. Unfortunately, in doing so, it takes a bit of a speed hit since some optimizations regarding large particle populations were left out. Feel free to use it / tinker with the source code however you like. All I ask for in return is street cred.
Platforms: C#, VB.net, Grasshopper, Rhino
I've simplified it a bit in an effort to keep the code clear. Unfortunately, in doing so, it takes a bit of a speed hit since some optimizations regarding large particle populations were left out. Feel free to use it / tinker with the source code however you like. All I ask for in return is street cred.
Platforms: C#, VB.net, Grasshopper, Rhino
Sunday, 24 April 2011
Self Organizing Cont.
Heres another video that better illustrates the multiple behaviors in action.
To unpack it a bit, each stick is composed of 3 particles, one in the middle and two on either end. Two springs span from either end to the middle and a third spring spans from end to end to provide some bending resistance. The middle particles are all involved in medium range, medium strength separative forces (grey circles) and slightly longer range, low strength cohesive forces (invisible). At the same time the end particles are trying to converge through small range, high strength cohesive forces (magenta circles).
Platforms: C#, Grasshopper, Rhino
To unpack it a bit, each stick is composed of 3 particles, one in the middle and two on either end. Two springs span from either end to the middle and a third spring spans from end to end to provide some bending resistance. The middle particles are all involved in medium range, medium strength separative forces (grey circles) and slightly longer range, low strength cohesive forces (invisible). At the same time the end particles are trying to converge through small range, high strength cohesive forces (magenta circles).
Platforms: C#, Grasshopper, Rhino
Self Organizing
In an effort to organize my life, I've been building up a class library based on some of the more recent agent / physics based work. I'm mainly interested in making the different behaviors more modular to better handle a variety of them interacting within the same simulation.
The self organizing hexes above use multiple scales of agent based behavior for overall cohesion and vertex convergence while springs do their best to preserve the geometry.
For now the class library is more of a growing personal tool set. In its current state it's pretty cryptic. If there's general interest though, I wouldn't be opposed to making it available after some more time in the oven.
Platforms: C#, Grasshopper, Rhino
The self organizing hexes above use multiple scales of agent based behavior for overall cohesion and vertex convergence while springs do their best to preserve the geometry.
For now the class library is more of a growing personal tool set. In its current state it's pretty cryptic. If there's general interest though, I wouldn't be opposed to making it available after some more time in the oven.
Platforms: C#, Grasshopper, Rhino
Monday, 14 March 2011
Par·ti·tion·ing
Heres a visualization of the previously mentioned space partitioning of a dual network. Yellow describes the space belonging to one curve set and grey the other.
Platforms: VB.net, Grasshopper, Rhino
Subscribe to:
Posts (Atom)

