NATURAL SYSTEMS STUDIO: Exploring Nature - Inspired Systems
Luke Hickman 1
1
CONTENTS
WEEK 1 Just Beginning, Variables, Conidtionals and Loops
WEEK 2 What is Possible?, Organisation: Functions, Objects, Arrays
WEEK 3 Intro Conclusion: Algorithms, Debugging, Libraries
WEEK 4 Numbers and Vectors
WEEK 5 Vectors and Forces
WEEK 6 Oscillations
WEEK 7 Particle Systems
WEEK 8 Physics libraries: Box 2D
WEEK 9 Physics libraries: More Box 2D, & Toxiclibs
WEEK 10
FRACTALS
Autonomous Agents and Complex Systems
WEEK 11
CHAOS
Cellular Automata
WEEK 12 Fractals Reading note: This work is to be read as a time based journal. Each week new theories, research and projects were explored. The work here in represents this weekly progression.
COMPLEX SYSTEMS ADAPTION To be further explored in Final Concept
Luke Hickman 2
2
PREFACE Diversity
In essence, Architects are primarily problem solvers and strategists first, before they are authors of aesthetic cultural products. This definition is not fixed when applied to individuals within the profession as diversity of the creative process is fundamental to the health of the Architectural culture as a whole. In addition, aesthetic and functional concerns often overlap and are co-dependant within design pathways.
Spontaneous
Contemporary Architectural discourse from 1990’s has been continually bombarded with new digital tools and resultant from them, entirely new design perspectives (2). These new digital design tools are useful to Architects in multiple ways; including time saving devices, expanded perception of 3d space and form manipulation through a virtual environment and most arguably the most important way being; spontaneous outcomes from procedural and parametrically driven scripted design processes.
Procedural Complexity Flux
This relatively new and small avant garde of architecture is exploring the frontier opened up by digital design platforms and scripting languages. This frontier promises a new design language capable of dealing with complexity, which will be integral to future architecture defined by a systems based, information loaded environments in a state of flux.
Avant-Garde
The state of the field of scripting and generative processes integrating structural and material simulation is in its relative infancy1. As well as being the language for complexity scripting provides the potential to bridge the creative divide between qualitative and quantitative data and open up new furtile achitectural domains.
1 Hensel, M., Menges, A., & Weinstock, M. (2010). Emergent technologies and design : towards a biological paradigm for architecture / Michael Hensel, Achim Menges and Michael Weinstock. Abingdon, Oxon. : Routledge,
Scripting as a bridging tool between creativity and complexity
3
3
Week 1
CONCEPT THINKING My initial concept ideas were stimulated by the below statments in Emergent Technologies and Design: Towards a Biological Paradigm for Architecture1.
Biological Mimicry
“ As mutations to the known form of organisms occur naturally, so too have the small innovations, theoretical ‘errors’ and design mutations of ancient architectures produced the ‘populations’ or cities of buildings, and driven the historical evolution of architecture.”
Evolution, Genetic
“Other differences include the mode of inheritance, which in culture may be horizontal or oblique, as cultural practices concerned with material construction diffuse between distinct social groups”. These two statements made me think if culture can be re-analysed as a natural system, what new models of human development and potential could be divined. If culture is just another complex system linked with the metabolism of nature, and architecture is the representation of cultural forces then a new architecture would be self referential of this change in perspective.
Metabolism
My idea is to engage with a portion or slice of the cultural data stream and use this information to inform an architectural outcome. Scripting should provide a way to harness the massive redundant cultural code and utilize this database to invent procedure to enable spontaneous architectural ideas to emerge. The idea of coding architectural product to perform dynamically with the environment follows the idea of emergence as it is applied to human culture. Architecture in this way is the environmental response of human agents interacting through cultural stimuli.
Culture of coding
This idea is elaborated in Michel Weinstock’s book the Architecture of Emergence, which explores the tendency of human culture to follow the a trend of increasing complexity2. He asserts that our culture will either learn to find an equilibrium with nature, or there will be a collapse and an eventual re organsiation. Eventually, human culture will develop and emergent equilibrium with the natural sytems of the planet. 1 Hensel, M., Menges, A., & Weinstock, M. (2010). Emergent technologies and design : towards a biological paradigm for architecture / Michael Hensel, Achim Menges and Michael Weinstock. Abingdon, Oxon. : Routledge, p 31 2 Weinstock, M. (2010). The architecture of emergence : the evolution of form in nature and civilisation / Michael Weinstock: Chichester, U.K. : Wiley
4
Non-linear systems
Hacker Architecture Culture needs to find an equilibrium with nature.
4
INITIAL RESEARCH THEORETICAL BEGINNINGS
Wk 1 cont.
Why use and learn scripting? It is necessary to be able to customise your own design tools. Greg Lynn explains his use of scripting as the inevitable outcome of the need to get the results your design intuition requries. “ Intuition is the moment when the principles and techniques of a discipline are so integrated that one is able to extrapolate, develop and extend them as an invention or innovation�1 . 1 Rocker, I. M. (2006). Calculus-Based Form: An Interview with Greg Lynn. Architectural Design (London, England), 76(4), 88-95.
Greg Lynn, Kleiburg housing project, Bijlmermeer, the Netherlands, 2006
5
5
Week 1
WHAT IS POSSIBLE? SEARCHING FOR PRECENDENTS. This source discusses how Architecture should not impose form, but through stochastic principals (applied mathematics) and sourcing the “massive data” of the contemporary world, find new strategies that incorporate both “soft data” (qualitative cultural information) and objective data to design effective (performative) architecture. Cynthia Ottchen proposes that there are two separate trends within architecture; the use of animation like software to create fluid dynamic shapes and morphogenic outcomes, and the productivity tool / BIM approach where documentation and project management is prioritized1. Ottchen explains that a new way of thinking will arise to bridge this traditional divide between the “romantic/rational” portions of architecture. This new bridging theory will enable architecture to engage the complex world in an “effective” way defined by stochastic principals that through the raw power of data and computing capacity can origanate ‘fit’, adapted results. She describes a new role for the architect as a “multidisciplinary strategist”. “Massive data is the new meaning” 1 ttchen, C. (2009). The Future of Information Modelling and the End of Theory: Less is Limited More is Different. Architectural Design, 79(2), 2227.
1. Fig 1, Photographic Tower Iteration, Ottchen, C, (2009)
6
6
1.
Wk 1 cont.
Fig 1, Photographic Tower Iteration, Ottchen, C, (2009)
7
7
Week 1
WHAT IS POSSIBLE? SEARCHING FOR PRECENDENTS.
This post graduate research project set in Santurce/San Juan Puerto Rico was based on developing urban scale synthetic models of the stocks and flows of economic and social forces within an urban field of interest. The students used computational models to break hierarchic topologies and re- order and develop non-linear, inventive program and spatial relationships. The winning master plan for the studio work synthesized a broad spectrum of competing hierarchical parameters such as bodies of water, transport paths and flows and zoning regulations. This project shows that scripting can be a powerful tool in collecting and diagramming complex design problems particularly on an urban scale. Even though the figural result may be highly conceptual its use as a diagram is profound1. Web Morphogenesis (see fig 1) is an example of a project that was inserted into the master plan. This project interestingly states that it is not form that follows function but the result of form in dialogue with function. With scripting both can compete and be manipulated non-hierarchically. It uses a “multi-agent based system working with curves, force fields and rules for a woven structure combined with rules for filling space through subdivision.� 1 Dubbeldam, W., Snooks, R., & Kolatan, F. (2011). New Normal Retrieved from http://issuu.com/archworkpenndesign/docs/pppd , p 37 -49
1. Fig 1, Systemic Compulsion
8
8
2.
2.
Wk 1 cont.
1.
1.
Dubbeldam, W., Snooks, R., & Kolatan, F. (2011). New Normal Retrieved from http://issuu.com/archworkpenndesign/docs/pppd 1. Web Morphogenesis 2. Systemic Compulsion
9
1.
9
Week 2
BACTERIAL WALKER The aim of this sketch was to design a process whereby particles explored and clustered the inert environment, then were organised via a selection process and made to change in some way. The initial idea was for it to be a model of human expansion and settlement across a landscape. Once a certain amount of particles in a zone was met a new exploration team was sent off. These ideas were too advanced at the time of this journal entry. The end result used a random step action and a selection routine highlighting particles with a specific opacity.
A. Probability used to
structure movement of an agent
B. Graphics used to select
and visually mark certain characteristics of an agent
10
1. //RAW CODE
// Code that isolated and highlights specific particles. First step toward selection. void display() { //additional data -object functions noStroke(); B if (opacity < 150) { opacity = 255; } fill(random(c),0,0,opacity--); ellipse(x,y,r1,r1); if(c>252){ stroke(0,255,0,opacity--); ellipse(x,y,r1*2,r1*2); colormatch = true; }} //random walker code
A void step() { // randomly steps the object from center if hits edge int choice = int(random(6)); // the random choice of if (choice == 0) { //number between 0-3 determines step x= x + 10; } else if (choice ==1) { x= x -10; } else if (choice ==2) { y = y + 10; } else if (choice == 3){ y=y -10; } if (choice == 4) { /number between 0-3 determines step x= x + 20; } if (choice == 5) { //number between 0-3 determines step x= x - 20; } else { y = y+ 20;} if (( x > width) || (x < 0)) { // reverts to near center pos x = width/2*z; } if (( y > height) || (y < 0)){ // reverts to near center pos y = height/2*z; } }//end method 10
Wk 2 cont.
B
A
A. Probability used to
structure movement of an agent
B. Graphics used to select
and visually mark certain characteristics of an agent
11
11
Week 3
LIFE AND DEATH This processing sketch was made under the parameters of learning to use arraylists and vectors. The particles randomly move through a set velocity variable and are contained within the screen boundaries. The complex visual representation is achieved via cross checking distances between individual particles so that a joining line can be drawn between them. This simple method instantly created a sense of architecture even if it is quite ‘dumb’. The sketch is made more interesting via the addition of two environmental zones, a life zone whereby a particle is added once crossed and a death zone where a particle is removed. Sliders were used to alter the size of these zones and get different behaviour.
A. Learn’t about the need for multiple arraylists to manage dynamic list references, so that there are no errors.
1. //RAW CODE
void draw () { background(0); //call functionality addList = new ArrayList(); deleteList = new ArrayList();
A
if (mousePressed) { Vec3D p = new Vec3D(mouseX, mouseY, 0); Spot newSpot = new Spot(p); spotcollection.add(newSpot); } for (int i = 0; i < spotcollection.size(); i ++) { Spot ms = (Spot) spotcollection.get(i); // call a collection of spots from the whole array. // println(ms); // run grouped functions from the Spot class ms.run(); ms.die(); ms.live(); } if (spotcollection.size() > 500 ) { noLoop(); } //run the remove code //loop through all the objects that need to //be removed, and delete //from the arraylist using the .remove() method
B. Learn’t about the concept of refer-
for (int i = 0; i < deleteList.size(); i ++) { Spot msd = (Spot) deleteList.get(i); // when you take something out of a list //need to give it a new name so the comp //knows what it is.
ences and indexes.
}
int spotIndex = spotcollection.indexOf(msd); //get the index of the objects //called from the deleteList //remove objects at index which is //defined by variable just added. B spotcollection.remove(spotIndex); //then run the add code //ditto, loop through the stuff in the add list, //and add to the //spotcollection list
for (int i = 0; i < addList.size(); i ++) { Spot msa = (Spot) addList.get(i); spotcollection.add(msa); } } }
12
12
A. Zone deleting particles from arraylist B. Simple lines between points, repre-
Wk 3 cont.
sent relationships
B
1. See Life and Death sketch, varying frames over time progression
A
13
13
Week 4
CULTURE GENOTYPE This sketch was started from the idea that in the future Culture as a living instance or suspended artifact could be analysed and mapped in all its scope. This sketch uses a random walker that was to have varying characteristics and interactive behaviors like explore, cluster, kill and breed to simulate the growth of cultural elements and their interconnectedness. At the time of this journal the sketch was working upon the principals of explore and cluster. The cluster behaviour simulated convergent cultural elements and the exploring behaviour cultural modes of distinction. The explore behaviour fed back into the system shocking the clustered elements with a greater acceleration once a certain escape distance was reached.
A. Undefined functions. Future ideas B. When one agent reached the box
boundary all agents would receive an accleration
C. Particles cluster when within range of each other
1. //RAW CODE // main walker characteristic set of functions void tendancies() { display(); update(); explore(); //parametric selection or (probability) // of population avoid clusters, accelerate away cluster(); //parametric selection (probability) //accel towards each other //kill(); //parametric selection (probability) //if touch each other one is removed //breed(); //parametric selection (probability) //if certain cluster size reached breads //tracepaths(); // run a trace line through selection //of points //web(); }
A
void explore () { if (explorergo) { for (int i = 0; i < Ws.size(); i++) { Walker explorer = (Walker) Ws.get(i); Vec3D kickstart = new Vec3D (random(-10, 10), random(-10, 10), random(-10, 10)); float bounds = loc.distanceTo(explorer.loc); if ( bounds > 50) { acc.addSelf(kickstart); } }}}
B
1. See CultureGenotype sketch
14
void cluster () { //create a time switch so only happens once each cycle if (frameCount == 100 && clustergo) { for (int i = 0; i < Ws.size(); i = i + isov) { Walker other = (Walker) Ws.get(i); float clusterdist = loc.distanceTo(other.loc); //if within range of pull then particles drift together if (clusterdist > 0 && clusterdist < neighbourdistance) { acc.addSelf(other.loc); C acc.clear(); clustergo = false; //switch off println(â&#x20AC;&#x153;clusteredâ&#x20AC;?); } } }}
14
1. See CultureGenotype sketch, varying frames over time progression
15
Wk 5 cont.
15
Week 6
2.
PREDATORS AND PREY IN A BOX
Dynamic construction of form with agent swarms
A
A.Attraction behaviour not based on Craig
Reynoldâ&#x20AC;&#x2122;s steering behaviours, hence predator agents cluster and do not follow the red prey particles. B.Structural issues with code. Learning about arraylists and the need for steering behaviours
1.
This week I looked at add attraction behaviors to agents and using arraylists to add and remove objects. I need to add avoidance, cohesion and separation to the prey class so that it more resembles the schooling behaviour of fish being hunted by dolphins.
B
The main outcome of this sketch was learning how to implements communication between classes and hence interaction between differing agents. The sketch seen heres only exhibits attraction of the predators towards the prey. When a predator hits the prey the agent is removed. This coordination required multiple arraylists and an understanding of indexes and references to an object.
16
1. See PredatorandPrey_1, - frame 100 2. Dolphins chasing sardine shoal Accessible via - http://africanspace.co.uk/activities/diving/sardine-run/the-bay-the-shoal-therun/ 3. my Processing Sketch - earlier version
16
Wk 6 cont. 3.
A.No emergence as system is not complex enough. Noise is not and outcome. However, artistic outcomes can result from direct manipulation of simple tools.
A
2.
This is the same predator and prey sketch where I turn off the background in the draw loop. This allows for a mapping or tracing of the predator movement as the prey visibility was turned off. The behaviour is a nuclearisation of the predators, as they are attractor to mutiple prey objects sourrounding them in a dense field. The extension of this project would be to use two conflicting object classes to provide data for mapping a surface or structure. For example the predator movement across a grid could manipulate the heights of a forrest of lines which have origin points mapped to the prey locations.
17
1.
1. See PredatorandPrey_1, - frame 200 2. “ “ - frame 1050 3. “ “ - frame 1600
17
Week 7
STIGMERGIC SYSTEMS Why use Stigmergy? Stigmergy is derived from concepts that classify “mechanisms the mediate interactions between social organisms”1. Stigmergy as an architectural tool in parallel with other natural systems like swarm behaviour and plant growth rules can provide a tool for aligning architectural production with the limits of an ecological system, whilst informing more effective structures and new aesthetic modes.2 1 Jason Lim, 2011, Let’s Work Together: A Stigmergic Approach to Acoustic Design, in Integration Through Computation, ETH Zurich, Aterlier Panda, ACADIA 2011 Proceedings,p. 396
2 Mammen, S. v., & Jacob, C. (2008).
Swarm-driven idea models- From insect nests to modern architecture. Retrieved from vonmammen.org/science/eco-architecture-2008.pdf
1.
Agents with simplestimulus reaction rules, interacting in a local neighbour hood of information. The agents can act on the inforamtion in two ways: 1. Qualitative, specific environmental data structures trigger behaviour. 2. Quantitative, the intensity of stimulus correlates with triggered behaviours.1 1
Mammen, S. v., & Jacob, C. (2008). Swarm-driven idea models- From insect nests to modern architecture. Retrieved from vonmammen.org/science/eco-architecture-2008.pdf
1. Termite trail on wood, Accessible via -http://dustygedge.co.uk/roadblog/wpcontent/gallery/teak-skin/teak-skin.jpg
18
18
Stigmergy provides a direct method for implementing a feedback loop between an agent and the environment. The aim is to acheive a relative equilibrium and an emergent patttern. //PSEUDO CODE Global Variables -Declare world environment -Declare ArrayList of Agents systems
Wk 7 cont. //AIMS Implement basic stigmergy Explore base image imports Explore blank image behaviour Explore search behaviour variables Implement a particle system for agents Trying to re-create in essence the forms emergent from the stigmergic behaviour of social insects like termites. However, termites follow different and more complex processes. This sketch only takes into account the path following behaviour of ter-
1.
Setup -Initialise Agent system container -Init environment Draw -Option to load image as background environment -Background pixels loaded into an array, so can be manipulated -Background slowly fades back to black -Agents run their functions. -Agents search for brightest, or most white pixel -Agents modify the background enviroment, leave a white trace
19
Class Agent -Contains properties to describe movement -Had custom behaviours: -Stays within the world - checks edges -Searches the pixels around itself -Moves towards best pixel -Modifies pixels underneath itself 1. Termite trail on teak skin, Accessible via -http://www.123rf.com/photo_13293400_ termite-damage-to-a-wood.html
19
Wk 7 cont.
A. A search radius of 1 pixel causes this linear, zig-
zag behaviour. The agents field of view causes it to weave back upon the initial straight lines
B. As time progresses the agent fills in the spaces
between the pathways. This explore, then weave, then fill behaviour is emergent, and will be interesting to explore further.
B
A
C
D
C. As the sketch progresses, top left to bottom 1. See Stig_directed1, my Processing sketch - frame 200 2. “ “ - frame 1050 3. “ “ - frame 1600
20
right grains occur as a result of the pixel worlds origin being in the top left hand corner.
D. Spawning multiple movers in one location may
also be contributing to the linear behaviour, although it is more likely to be the search radius.
20
1. //RAW CODE //check the environment around the object void checkWorld(){ PVector toBest = new PVector(); //create a temp vector to //keep track of the direction of the best condition float maxV = 0;
A //loop through pixels for (int i = -searchRad; i<=searchRad;i++){ for (int j = -searchRad; j<=searchRad;j++){ if(!(i==0 && j==0)){ //checks for edges int x = floor(location.x)+i; //â&#x20AC;&#x2122;floorâ&#x20AC;&#x2122; - Calculates the // closest int value that is less than or equal to the // value of the parameter x = constrain(x,0,width-1); // constrain(value, min, max) int y = floor(location.y)+j; y = constrain(y,0,height-1); //check to see if this is the smallest current value //scale by the distance to the value float v = world.getAt(x,y); PVector toV = new PVector(i,j); //limit the angle of vision if(PVector.angleBetween(toV,velocity)<PI/2){
B
//check to see if the current value is larger than //the current best if((v)>maxV){ //reset all our variables that keep track of the //best option float d = toV.mag(); toV.mult(1/d); h toBest = toV; maxV = v; } }}}}
}
//only effect if finding something above a tolerance if(maxV>1){ applyForce(toBest); Agents vision of environment. }
A.
Wk 7 cont.
Why the code?
The raw code to the left, describes the key function that drives the Stigmergy behaviour. It took a while for me to figure out how this was actually working. I had to read through and annotate step by step in order to decipher the code. Importantly, this code creates the opportunity to link in more variables. As what is seen in latter images incorporates multilpe fixed values that can be made into dynamic values. In later sketches I will add oscillation and probability to vary the angle of vision, the tolerance and the search radius. Manipulating these variables should allow for significant change in the outcome.
B. Field of view and structure of
weave when search radius is 1.
Search Radius of 1. Results in interesting behvaiour. Acts more like a qualitative trigger, as the field of view function is triggered by the environmental structure.
1. See Stig_3, Key part of code that directs the acceleration of particles
21
21
Wk 7 cont.
5-8. A. Oscillation added to Angle of Vision
(Field of View) - Increased Clustering or ponding.
A
1-4. 22
1 -4. See Stig_3, Close up images of Stigmergy sketch 5-8, Screen shots at progressive frames of the same sketch
22
Added spawning Agent
Wk 7 cont.
The aim of this sketch was to add a spawning agent to automate the distribution of stigmergy systems. Figure 2 shows the code for the introduction of the spawning agent. The crucial code section is the void spawn function which has a constructor which allows for variance in number of movers spawned and random velocity.
B.Clustering exhibited as
The spawning agent was set on random trajectories. In the future I would like the spawning agent to follow some kind of intelligent pathway. For example, it moves towards a clear zone which has not been traced by the stigmergy system. This would allow development of a constantly spreading system. Jose Sanchez in his Open Processing Libary for the Stigmergy 2D sketch, pointed to the key point that the agents need to have some purpose 1 . Just like termites the paths formed need to be finding out something. I need to think of what the stigmergy system could optimise. In future iterations I would like to add a variable for controlling when and how many movers are added to each spawning of a mover system.
mutiple mover-systems relatively on top of each other
B
1.
2. 3.
1 Jose Sanchez, Stigmergy 2D, (Open Processing), <http://www.openprocessing.org/
sketch/21385> [Accessed Sept 2012]
A. Multiple Agent particle systems
spawning from, a moving spawning agent.
A
1 -2. See Stig_4, Stigmergy with spawning agent 3. Screen close up image a of the same Stig_4 sketch
23
23
Wk 7 cont.
A
B
1.
A. Spawning agent added to Stigmergy System B. Equilibrium overtaken by rampant particle system spawning 1. See Stig_3
24
24
Wk 7 cont.
A
A. Increased environmental fade 1.
Stimuli intensities,structure and agent behaviours need to be in balance with the environmental context. Environmental feedback loops must be made visible.
1. See Stig_3
25
25
Wk 7 cont.
A
1. A. Added oscillation to death speed 1. See Stig_3
26
26
Wk 7 cont.
A
B
1.
An unbalanced equilibrium can produce more interesing results as well.
A. Increased oscillation max for death speed
B. Increased background fade = equilbrium of white fill
1. See Stig_3
27
27
Wk 7 cont.
A
C B
1. A. Increased spawn numbers B. Emergent straight lines, agents inhibit each other 1. See Stig_3
28
28
Wk 7 cont.
A
B C
1.
1. See Stig_3
29
A. Straight lines emerge in parallel to grain B. Increased numbers, fade an death oscillation C. Consistent grain from top left to bottom 29
Wk 7 cont.
Curation: Adjusting settings with a graphical user interface A. I found it interesting to play with the field of
view (FOV) function informing the particles vector. Influencing FOV allowed weak control over the clustering and expansion of the particles.
B. I started to add oscillation effects to the acceleration in order to vary the movement.
The figures 1 to 3, show a behavioural change in the particles as there search radius is increased. Figure 4 on the next page shows an instance when the search radius has been significantly increased, in the context of the sketch parameters. The Graphical User Controls (GUI), see in figure 5, allowed me to introduce parametricism, with the aim of finding emergence behaviour from certain settings.
A
This manual control allows for a curation of the process to occur. In order to find a sketch that exhibits behaviours of natural- systems the user has to experiment with the variables.
For lack of coded genetic adaption, human evaluated criteria is important to facilitate interesting and emergent outcomes.
B
B. 30
By experimenting with the death speed of the particles and the fade speed of the background environment I attempted to find an equilibrium of growth. This hopefully would allow an emergent form to develop.
1. See Stig_directed_12, Stigmergy sketch with mouseDragged Spawn 2. Ibid 3. Ibid
30
Wk 7 cont.
A B
Natural Systems look organic as there is more variance in behaviour, resulting in normalised curved patterns. 31
A. Stigmergy with increased search radius B. Looks more like actual termite paths 4. Stig_directed_12
31
Wk 7 cont.
Adding Physics to the Stigmergy Sketch 1. //RAW CODE
A void searchAgents() { // need to find out how to access arraylist in the moversystem //loop through all movers in arraylist for (Mover a: pop) { //get essential variables //if distance between one particle and another is //less than set variable // then apply repel force which is the inverse of //applyforce function. //test agents locations to one another PVector diff = .distanceTo(a.location); if (diff > 0 && diff < 2) {
}
}
}
2.
}
//RAW CODE
}
Particularly, I will need to implement inheritance in more instances to modularise and simplify my code and input new behaviours.
agents in the agent system, then to register distance between agents, and apply a repulsion force.
if(d<100&&d>0){
}
The problem came from trying to reverse engineer. The simplicity of the code was compromised and I will need to look at my structures in the future.
//if with distance apply negative force //- repulsion PVector f = new PVector (random(5),random(5)); f.mult(-1); The code refered to in figure 1 was acceleration.add(f); aimed at searching through all the
void searchAgents(){ //reset accel for (Agent a:agentPop){ //get essential variables Vec2D diff = a.getPreviousPosition().sub(this); float d = diff.magnitude();
}
In the following sketches I need to clarify how you can refer to arraylists inside a meta - particle system from inside a class.
attract(diff.copy(),d); //attract to neighbour align(a.getVelocity(),d); //align with neighbour if(d<20) { repel(diff.copy(),d); //avoid neighbour }
I had problems patching together the extended particle example provided by Gwyllim Jahn, and my multi - particle Stigmergy system. I learnâ&#x20AC;&#x2122;t the importance of defining the code structure, ie extending the verlet Particle function from the beginning of the sketch. In the future when I see the need for physics at the start, I will build off a base class of the extended Verlet Particle. Although, I realised too late that it is far simpler to just add repulsion as another custom fource. I began trying to implement an inverse of the acceleration, as seen in figure 1.
A. At this time I faced some structural is1. See Stig_ 9, Code snippet from Sitgmergy Sketch 2. Code snippet from Gwyllim Jahnâ&#x20AC;&#x2122;s, extended particle example.
32
sues with the code, In particular converting between PVector and Vec3D, inheritance, and general sketch structure.
32
Precedents and Research Lim includes in his article a defintion by Zoologist Pierre Paul Grasse of a stigmergic system; “Stigmergy describes a form of indirect coordination between organisms using signals left in their environment. These signals persist and cue subsequent behaviours in other individuals”.
Lim also states an important intellectual facet of stigmergic systems; “[p]roblemsolving information is actually embedded in the external environment as a form of external memory”. The idea of embedding memory into the environment through architecture and techniques derived from natural systems is very interesting.
How could this idea of interactive memory sites be used in the architectural 1. field using humans as the agents of the stigmergic sytem?
Wk 7 cont. Jason Lim in Proceedings from ACADIA 2011, explores the use of Stigmergy to derive the most optimum acoustic design for an auditorium. The key facet describes is the ability of the ‘rays’ or agents to change the environment they come into contact with1. The computer simulation done in Rhino and Grasshopper trys to emulate and prove the analog form finding used by Alvar Aalto at the Viipuri library in Vyborg Russia. See figure 1 for the Viipuri Library. The system designed emitted particles symbolising sound from a central point on the stage of a 3d modelled auditorium. The particles interacted with the auditorium structure and the seats. The interaction between particles and the environment were mapped and fed back into the environment. Via multiple iterations and using pre conceived acoustic parameters an optimised acoustic space emerged from the stigmergic system. This non linear form finding approach proved the validity of Aalto’s analog procedure and the viability of the digital tool. 1 Jason Lim, 2011, Let’s Work Together: A Stigmergic Approach to Acoustic Design, In Integration Through Computation, ETH Zurich, Aterlier Panda, ACADIA 2011 Proceedings,p. 396
Fig 1. Alvar Aalto, Aalto_viipuri_07, (USA, Souther Polytechnic State University), http://fac-web.spsu. edu/architecture/classes/Setiawan/libraries/Aalto_libraries/ [Accessed Sept 2012]
33
33
Week 9
VOLUMETRIC SPACE ARRAY - TOXICLIBS A method to implement 3D stigmergy
1. Extrapolated from Jacksonâ&#x20AC;&#x2122;s VSA Sketch (Student at Monash Uni) 2. http://farm1.static.flickr. com/118/308046510_eb0a1948eb.jpg
Why use VSAâ&#x20AC;&#x2122;s? In order to create a 3D stigmergic sketch the program needs to be able to identify Voxels which are points with a resolution at each position in 3 dimensional space. As opposed to the 2D representation of 3D space which would not allow for 3D interaction to occur.
2.
//PSEUDO CODE Global Variables -Volumetric Space Array (VSA)
Setup -Initialise VSA & Brushes, -Load Array, run voxelMesh function Draw -Draw bounding box, -run VSA function, -run agent functions
1. Class Agent -Agent searches space then moves towards voxel with highest opacity, else, it moves randomly. -Agent stays within box. -Agent has chance of self-replicating -Agent path is traced onto world with brush func.
34
Class VSA -3D space is filled with voxels at x,y, z locations -func. for getting voxel resolution at each location - 3D space is filled with points at x,y, z locations with opacity constrained to range 0-255
34
Agents following the most used path left by traces of previous agent movement, whilst acting according to flocking behaviours.
Wk 9 cont. //AIMS Add Vec3D to Stigmergy Stetch Add Flocking Behaviours Add Physics Add 3D environment Use Voxel 3D Stigmergy Sketch
1.
//PSEUDO CODE Global Variables -ArrayList flock
Setup -Initialise ArrayList
Draw -Create ArrayList -run agents through ArrayList Class Agent -Agents run through ArrayList -Agents follow best path -Agents trace paths -Agents have cohesion -Agents have separation -Agents have alignment
35
Trying to re-create in essence the forms emergent from the stigmergic behaviour of termites. Class VSA -3D space is filled with voxels at x,y, z locations -func. for getting voxel resolution at each location
However, termites follow different and more complex processes. This sketch only takes into account the path following behaviour of termites. Fig 1. Termite Mounds, http://www.ourterritory.com/katherine_region/images/termite_hill.jpg Fig 2. Extension of Extrapolated Jacksonâ&#x20AC;&#x2122;s VSA Sketch, plus add Shiffmanâ&#x20AC;&#x2122;s 3D flocking example
- 3D space is filled with points at x,y, z locations with opacity constrained to range 0-255
2. 35
Week 9 cont.
A
B
4.
B
1.
2.
3.
A. Flock of agents each with a small brush which leaves a trace on the VSA environment. 3D pathways emerge.
B. Straight branching structures emerge because the search radius has been reduced to 1. This makes the agents want to zig zag.
36
Fig 1.volumetricspacearray_ext_ flocking(frame 1681) _Extends G,Jahns Sketch Fig 2. (frame 11914) Fig 3. (frame 12544) Fig 4. (frame 13229)
36
Wk 9 cont.
Why add flocking behaviour to Stigmergy? A. The large black dots (Agents) are more likely to follow the white dots (Voxels), the agents leave behind more white, this leads to stigmergic patterns, and emergent pathways
A
B. Agents also want to flock together and form a group
Flocking behaviour leads to more intense pathways, and it could be argued represents a more reactive and realistic stigmergy. This is because flocking strengthens the initial creation of stigmergic pathways via applying more agents to the task. Flocking also enables a hightened sensitivity to a pathway, as more agents are within range of each search zone. Flocking addes anther layer of complexity which pushes the outcome beyond the intial range of our imaginations. I have imagined that a VSA stigmergic system could act as the environmental stimuli, shaping another trace within the space. For example, the negative space defined by the stigmergy could be extrapolated as the architectural space, and then further manipulated by agents systems. A stigmergy system could apply force to a force directed network, or even act in concert with a cellular automata structure. Fig 1.volumetricspacearray_ext_ flocking(frame 1129)
37
1.
How to extend 3D stigmergy? How to apply this process to an architectural application? -Demarcate Space -shapes a mesh surface -see Roland Snooks & http://www.kokkugia.com/
37
Week 10
FORCE DIRECTED NETWORKS WITH SWARMING AGENTS Combining Systems in order to achieve architectural outcomes, and complex systems Why use Force Directed Networks? “ [F]orce directed graphs [or networks] have provided a means of organising relationships and rationalising them within cartesion space. “ Also, using Isosurfaces, (a method of applying a skin to a dynamic structure) we can “... create surfaces in-situ within a particle context with a high degree of control and flexibility.” In this way complex, dynamic data can be organised and distributed in space to inform the construction of architectural space and structure. 1
1 Collins, M., & Hasegawa, T. (2009). Deriv-
1.
ing Architectural Surfaces from Relationship Graphs. Retrieved from Proxyarch website: www. proxyarch.com/PDF/DerivingSurfaceFromGraphs. pdf
1. Example of a Force Directed Map creating an Isosurface representation, from Figure 1, in (Collins,Hasegawa,2009) 2. Onion Skin facade, using multiple thresholds of a graph to drive surface form generation, from Figure 8, in (Collins,Hasegawa,2009)
38
38
Wk 10 cont.
Force Directed networks can act as the base structural and organisational logic for an architectural system. Overlayed swarm agents can manipulate the structure, based on tendencies introduced into the sketch. Mesh Agents can be added to cloth the architectural construction. 39
//AIMS Create a base Fractal tree or L-system Create an agent system over this Add Springs, make a force directed network
(FDN)
Add Physics, friction, gravity ? Swarm agents sculpt the FDN Introduce Mesh Agents, or Marching Cubes
1. My evolving concept idea is leading down the line of adapting and combining a swarm system, with a base environmental mapper (ie L-system) and finally, with a meshing agent system. L-systems seem to be a fruitful path to explore as the DNA like instructions used to generate a map of particles, provides a platform for encoding and adaptive system. For example, the Lsystem instruction grammar is adapted in response to the environment or swarm agents. Fractals and L-systems represent the natural process of a living structure growing in an environment. This provides an opportunity to use these systems to organise architecture in a metabolistic fashion. The Architecture grows in the urban realm according to the resources and opportunities of the space. Fractals are also inherantly structural as they are based on recursion, which can generate symmetrical self -similar structures. Self-similar base logic for architecture is also useful for simplifying fabrication, and preserving resources.
39
Wk 10 cont.
FRACTAL GENERATOR
B
1.
A
2.
//PSEUDO CODE Global Variables 1. Fractal structure generated using sketch, extrapolated from Henderson (User) http://www.openprocessing.org/user/3583 http://www.openprocessing.org/sketch/6830 2. Ibid
Recursion is a powerful tool, however, it has limitations in regard to accessing the growth nodes and manipulating the growth process. A. Structural Logic emerges from recursion tech-
nique. Also describes a method of filling space with a connected network.
B. Since, the Stigmergy exploration I have been
interested in the space created between the growth structures, this is an opportunity for describing architecural space
40
-ArrayList of Fractals, ie Branches
Setup -Initialise ArrayList -Add Fractal structure
Draw -Build in generator, which resets ArrayList, creates new fractal Class Fractal -Create for variables - Branch size - Limit to recursion (Stops infinite loop) -rotation of growth direction -growth length in new direction -fractal grows one, step, growth instruction is called within itself -cont. till limit
40
Wk 10 cont.
L-SYSTEMS C
C. Environmental factors can feed
B
A
back into the text defining the growth behaviour, this will require more knowledge surrounding the grammar structure of L-systems and exploration into adaption.
//PSEUDO CODE Global Variables -ArrayList for Agents -ArrayList for Points -Growth Variables -String Production constants How growth instructions are read -Declare L-system library utitlity Grammar
L-Systemâ&#x20AC;&#x2122;s seem to have more flexibility than a recursive fractal, when used as a dynamic platform for organising a structural growth.
Setup -Init & Setup Grammar -DNA or growth instructions as a text Draw -Init Agents to hold points in L-system -Run Physics world -Read through growth instructions and create locations for agents to populate from this text Class Agent
A.
Agents located by growth instructions setup via a string or characters, that encode for more elaborate instructions.
B. As recursive functions not used, Agents can be accessed for future actions.
41
-Extends VerletParticle, useful for later use. -draw agent as point -base structure for future agent behaviours
41
Wk 11 1.
FORCE-DIRECTED NETWORK WITH SWARM AGENTS
A
A. Springs between network, organised by closest point.
B. Swarm agents, exhiting Craig Reynoldâ&#x20AC;&#x2122;s
steering behaviours. Problem occuring with clustering and not effecting network properly.
B
3D network of nodes create a base structural logic.System held together by spring physics and selfrepulsion between nodes. Swarm agents trigger behaviours in network. 1.
42
See l_system_swarm5 sketch
//PSEUDO CODE Global Variables -Declare L-system variables -Declare swarm agent variables
Setup -Initialise physics -Setup L-system grammar -Add initial swarm agents
Draw -Update physics world -build L-system -add L-system points to arraylist -attach agents to L-system points -set switch cases
Class Agent -Extends VerletParticle -Searches for closest neighbour -searches for other sAgents in nearby -searches its own system arraylist -updates position (moves)
Class sAgent -Flocking agent -Flocking behaviours -cohesion -separtion -alignment -go to random Agent position -triggers Agent behaviour -Future- build in path following
42
Wk 11 cont.
Self organising networks
A
1.
2.
3.
B
4.
5.
7.
8.
6.
A. Boxes are pulled together by spring physics implemented with the toxiclibs library.
B. Nodes eventually stack themselves into two
groups, separated by the flocking swarm agents
43
1-8. Frame progressing with time,See l_system_ swarm5 sketch
43
FORCE-DIRECTED NETWORK WITH SWARM AGENTS
Wk 11 cont.
1.
A
A. Springs between network, organised by closest point.
B. Swarm agents, exhiting Craig Reynoldâ&#x20AC;&#x2122;s
steering behaviours. Problem occuring with clustering and not effecting network properly.
B
1.
Fill on - See l_system_swarm5 sketch
2.
Wirefram - See Ibid
44
2. 44
Wk 11 cont.
3D path following -need to predict future path
A
//PSEUDO CODE
1.
Global Variables -Declare Arraylist to hold imported points -List for Spline3D -Declare path object -ArrayList for Agents Setup -Convert points to spline3D -3D camera setup -Call function to create new path -Add initial agents to world
B
Draw -display spline3D path -loop through agents and run functions -custom functions -create new path -add boid 2.
A. Spline3D (from toxiclibs) run through points imported from the L-System sketch
Class Agent -Declare Properties for movement -Constructor - control location, maxforce and max speed -apply force to follow path -follow path function -predict future direction -find normal target on segment of path ahead -check how far away from path -Agent separation function -Agent steer
Class Path -Init arraylist to hold points of path -radius of path - function to add points to path -display path
B. Agents use Craig Reynoldâ&#x20AC;&#x2122;s path following algorithm. Implemented with PVector.
45
1. 2.
,See 3DPathfollow sketch Close Up ,Ibid
45
Wk 11 cont.
Concept Evolution
Reconfigure PVector path follow to Vec3D
//AIMS
Thread agent paths through FDN Path through network is dynamic FDN nodes lock when a certain condition is met Nodes change characteristic dependent on organisation Use a version of cellular automata for internodal commâ&#x20AC;&#x2122;s Learn about adaption and implement Apply mesh agents to skin the structure
For my final project I am interested in implementing a multi-layered complex systems incorporating, l-systems, force-directed networks, agent swarms, cellular automata and stigmergy. Via layering these different tools complex emergenct behaviour and patterns can be massaged out of the code.
The idea is to create a base structural logic that reacts adaptively to the metabolism of the local environment. This base structure is populated with agents nodes that are attached to the structure. The nodes react with each other to self-organise. Agent swarms following paths, using either 3D path following or stigmergy, trigger node behaviours. The nodes and base structure gradually shape into a form in equilibrium. Mesh agents trace the base structure and create a skin or internal network lattice. 3D print the structure.
46
46
Issues converting PVector to Vec3D and making the 3D path following algorithm work with my force directed network and swarms 2. //RAW CODE // A function to get the normal point from a //point (p) to a line segment (a-b) // This function could be optimized to make fewer //new Vector objects Vec3D getNormalPoint(Vec3D p, Vec3D a, Vec3D b) { // Vector from a to p Vec3D ap = p.subSelf(a); // Vector from a to b Vec3D ab = b.subSelf(a); ab.normalize(); // Normalize the line
Wk 11 cont.
A
1.
// Project vector â&#x20AC;&#x153;diffâ&#x20AC;? onto line by using the //dot product B ab.scaleSelf(ap.dot(ab)); //COULD BE THIS
}
Vec3D normalPoint = a.addSelf(ab); return normalPoint;
Vec3D as a tool for describing 3D space has more functions and utility allowing more complicated sketches 47
A. Path points are nucleated into one point. Path is not shown.
B. Problem is in the agent class 1. 2.
See CrowdPath-following-Vec3d Code from Ibid
47