Issuu on Google+

SHERMAN LAM

NATURAL SYSTEMS STUDIO 2012


PREFACE

3

1.0 THE THEORY OF EMERGENCE

5

1.1 Natural Selection and Mutation

7

1.2 The Complex System

9

1.3 Architecture

10

1.4 The Potential

11

2.0 COMPUTATIONAL SIMULATION

2.1 Computation

15

2.2 Movement

16

2.3 Probability

17

2.4 Force

25

2.5 Oscillations

29

2.6 Particle System

33

2.7 Autonomous Agents

35

2.8 Cellular Automata

41

2.9 Fractals

47

2.10 Genetic Algorithms

51

2.11 Neural Networks

57

Sherman Lam 296011 Tutor: Stanislav Roudavski Tutor: Gwyllim Jahn Natural System Studio University of Melbourne 2012



13


CONTENTS 3.0 EMERGENT PROJECT

3.1 Animal Architecture

65

3.2 Stigmergy

67

3.3 Precedents

68

3.4 Project 1

71

3.5 Project 2

75

3.6 Project 3

84

4.0 CONCLUSION

4.1 Concept

99

63

97

4.2 Techniques

100

4.3 Design approaches

102

4.4 Future work

102

103

APPENDIX 1: SKETCHES

104

APPENDIX 2: SMOVIES

104

REFERENCES



PREFACE

The fluttering of a butterfly's wing in Rio de Janeiro, amplified by atmospheric currents, could cause a tornado in Texas two weeks later. Edward Lorenz We live in a complex world in which everything is interrelated. A flap of a butterfly may cause a chain of irreversible effects on not just the surroundings but the entire world. This is the theory of butterfly effect, coined by Edward Lorenz. From the complex system, it leads to 'Emergence', the resultant of the interactions amongst individual entity in the system. How could one understand or find order in this complex system and how will it influence architectural design? This book will be divided into 4 parts. The first part will look into the theory of emergence with regard to the natural world and architecture. The second part will explore the potential of computational simulation and its technique. The third part documents the emergent project developed using the theory of part 1 and the technique in part 2 and hence explore its potential in architecture. The last part will be the conclusion of all the theories and techniques I learn in the process of constructing this album. Background: http://natgeotv.com/asia/great-migrations/galleries/ A flock of Monarh Butterflies during their seasonal migration.





1.0 THE THEORY OF EMERGENCE

//1.1 Natural Selection and Mutation //1.2 The Complex System //1.3 Architecture //1.4 The Potential Background: http://science.nationalgeographic.com/wallpaper/science/ photos/rocks/giants-causeway/ The Giant's Causeway in Northern Ireland is an example of a complex emergent structure created by natural processes




1.1 

It is not the strongest of the species that survives, nor the most intelligent, but the one most responsive to change. Charles Darwin1 The Nature is a complex system which is constantly evolving. It does not follow a top-down approach, and has no predetermined goals. Evolution as suggested by Darwin, is a process of how organisms adapt to its surrounding environment. The new generation is different from the previous generation and it is constantly evolving to adapt to the new environment with mutation as the resultant of the adaptation process. Through natural selection, it will be the most responsive to the environment survive eventually. There is so much we can learn from the natural system. What I propose is not the bio-mimicry that only imitates the aesthetic of the nature but the study of the system which brings along the mutation in response to the change of environment.

QUOTE 1 - http://en.wikiquote.org/wiki/Charles_Darwin

1.1: http://2.bp.blogspot.com/ Diversity and complexity emerge through the process of natural selection and mutation.


Complex biological forms developed from very simple beginning, and natural selection was the means by which each species became more perfectly fitted to its environment. Michael Weinstock2 QUOTE 2 - pp. 22 The Architecture of Emergent The Evolution of Form in Nature and Civilisation, Weinstock, Wiley




1.2 THE COMPLEX SYSTEM A complex system is the resultant of the numerous interaction of individual entity with its immediate neighbours and with the environment. An individual entity may only perform a very simple task, however with the iteration of each individual entity responding to the environment, a complex system is emerged. A complex system is able to tackle the most difficult task which is impossible for a single entity to handle. A colony of termites will build a complex termite mould responsive to environmental changes which will enable the colony to survive as one system where single termite will never be able to survive on its own. Similar to the termite colony, the complex structure of the coral is formed by the iteration of millions of simple organisms.

1.3

1.2

1.4

1.2: http://www.reefcheckaustralia.org/adopt-a-coral-polyp.html Coral consisted of millions of siple organisms 1.3: http://www.getintravel.com/adventure-travel-to-kakadu-national-park-in-australia Complex structure of the Termite Mounds 1.4: http://en.wikipedia.org/wiki/Great_Barrier_Reef Barrier Reef is the largest single structure made by living organism




1.5: http://www.sciencephoto.com/media/185854/ enlarge/

Khara-Khoto in Inner Mongolia was once a thriving city of the Tangut Empire as described in Marco Polo's travel journal. However it was abandoned 700 years ago after its lifeline, the Black River was diverted. This is an example of cities failing to adopt to the change of the environment.

1.3 ARCHITECTURE

In Weinstock's Architecture of Emergence, Weinstock illustrates the resemblance between the evolution of nature and the evolution of civilisation. Cities reconstruct and expand overtime to adapt to the changes in environment. Similar to the process of natural selection where specie extinct if it fails to adapt to changes. Species diversify and evolutes to adapt to changes of its immediate environment. This results in an emergent system which constantly evolves to the reaching of equilibrium. With the advancement of technology and the power of computational simulation, a complex system could be incorporated into the design of architecture upon an equilibrium of the needs of the users with regards to to the ever changing environment is derived.




1.6

1.7

1.4 POTENTIAL

Computational design lends itself to an integral design approach as it enables employing complex behaviour rather than just modelling a particular shape or form. Weinstock3 The two structures explore the potential of computational simulation as a tool that formulate the design rather than a simple shaping tool. Technology allows greater integration of construction in the design process. With the availability of the material, the climate and the context of the site become the parameters formulating the design. The knowledge of parametric design also enables the digital fabrication of the material which reduces the time and number of skilled labours required for the construction. Contrast to the Membrane Canopy, the viewing platform utilises more mundane building materials with limited technology. The computational process enables the complexity of design similar to the AA membrane however with limited material and technology. QUOTE 3 - pp. 51 Emergent technologies and design: towards a biological paradigm for architecture, Hensel, Menges & Weinstock, Routledge




1.6: http://www.achimmenges.net/ AA Membrane Canopy, London 2007

1.7: http://www.achimmenges.net/ Viewing Platform and Shelter at Hacienda Quitralco, Patagonia, Chile 2007

1.8

URBAN AGENCY - ROLAND SNOOKS 1.8 "The proposition of the project is that an organism capable of autonomous or intelligent drift through the urban fabric is able to develop an emergent architectural form and organisation intrinsic or peculiar to its environment." kokkugia.com The resultant is the reaction of the agent to the environment and thus its behaviour. The agent constantly extracts and exchanges information with the environment and then evolves accordingly to the information extracted from the environment and eventually strikes an equilibrium.







2.0 COMPUTATIONAL SIMULATION

//2.1 Computation //2.2 Movement //2.3 Probability //2.4 Force //2.5 Oscillations //2.6 Particle System //2.7 Autonomous Agents //2.8 Cellular Automata //2.9 Fractals //2.10 Genetic Algorithms //2.11 Neural Networks Background: http://ngm.nationalgeographic.com/2012/04/flamingos/nigge-photography A flock of Flamingos




2.1 COMPUTATION

2.1

THE COMPUTATIONAL BEAUTY OF NATURE, GARY WILLIAM FLAKE, MIT PRESS Start with something so simple as not to seem worth stating and to end with something so paradoxical that no one will believe it. Bertrand Russell4 The essay introduces the concept of computational modelling of nature. Computational modelling will be the key to understand the complex system of nature. Despite the complexity of nature, it can be understood through a reductionistic approach which breaks down the system into multiple simple agent that interacts with each other. One of the examples of such approach is the study of DNA which eventually yields a better understanding of a complex system as a whole. Similar approach can also be used to understand the formation of emergent pattern in nature. This will allow us to comprehend the complex system in nature, and to employ the method to construct complex solution. The process of computational simulation utilises the system of 'iteration', 'recursion' and 'feedback' to achieve complexity. Such bottom up approach allows the generation of complexity and emergent behaviour which draws parallel to nature. Flake divides the theory of computational simulation into five different concepts: computation, fractal, chaos, complex system and adaption. Computation explores the limit of computer and what are the factors determining the function ability to be computed. Fractal explores how iterating equation can build up complexity. Chaos examines the random behaviour which leads to unpredictability in the long run. Complex system examines how interactions of simple agents within a system can lead to a complex solution. Finally, adaption allows the complex system to change, to learn and to evolve which ultimately mimic intelligence. QUOTE 4 - pp. 1The Computational Beauty of Nature, Gary William Flake, MIT Press 2.1 - pp. 7 The Computational Beauty of Nature, Gary William Flake, MIT Press




2.2 MOVEMENT

2.2

This processing sketch uses the bouncing balls sketch as a basis to develop the pixilated effect. The pixilated effect was achieved by moving the particles in the value of the width of the pirticles. This sketch also uses the object system to increase the number objects in the sketch. Same to the bouncing ball sketch, the object will bounce back once it hit the edges of the screen, this was achieved by multiplying the speed by negative 1. The speed of the objects are also randomized by the value of 1 to 10 pixels. Furthermore the colours of the objects are randomly drew from 3 preset colours.




2.3 PROBABILITY




2.3 Convergence, Jackson Pollock 1952

Randomness

2.4 Brownian Sunflow , Toxiclibs

Probability is the core concept behind randomness. Probability is the framework while randomness is the mechanism to produce result. Randomness is used in Art to express the subconscious mind, or to generate outcome that is free from rules and boundaries. In computer science, randomness is framed by probability. Instead of being truly 'random', it is rather the visualization of the possibilities of a given probability in an algorithm. If the sample size is large enough, the 'random' samples will always be very close to the value of the given probability.

2.3 - http://arthistory.about.com/od/from_exhibitions/ig/action_abstraction/jm-aa_08_08.htm 2.4 - http://toxiclibs.org/2010/02/new-package-simutils/




RANDOM WALK

A

B

C

D

2.5




A

B RANDOM WALK 2.5 This sketch uses random walker as well as an array list function. The random walker function will be essential to develop spontaneous and organic behaviour that mimic the nature but it has limitation as it does not generate 'real' random numbers which formulate a pattern.

C

2.6

A

2.6 This sketch further explores the potential of the random walker. Each particle is initially located in a random location, then sprawl out randomly at a randomized speed. Same to the bouncing ball sketch, the particles bounce back in an opposite direction once it hits the edges of the screen. A line is then drawn when two particles are within a preset distance, and a triangle with randomized colour is drawn when there are three particles within a preset distance. 2.7 With the connecting lines and triangles, it gives a false impression of a 3 dimensional space though it is only a 2 dimensional sketch. With this sketch, an interesting object can be created if there is a logic behind the movement of the particles. The 'logic' or 'behaviour' will determine the path of movement and hence create an object that response to the particle itself.

B

2.7




LEVY FLIGHT

A

B

2.8




//Random Walk void move() { int xstep; int ystep; float choice = random (1); if (choice < 0.7){ //tendency to move randomly xstep = int(random(0,3))-1; //random walk for x ystep = int (random(0,3))-1; //random walk for y }else{ xstep = 1; //random walk for x ystep = 1; //random walk for y } x += xstep*xspeed; // acceleration y += ystep*yspeed;

LEVY FLIGHT

In the levy flight, the random walk behaviour of the agents is determined by probability. In the sketch, I set the probability at 70%. Which mean the agent will have 70% chance of performing a random walk and 30% chance of walking in straight line. The result is a trail consisting both random movement and straight line.

ď&#x20AC;˛ď&#x20AC;˛


PERLIN NOISE

A

B

2.9




//CONSTRUCTOR Parti(){ loc = new PVector(random(width),random(height)); xstep = pow(-1,round(random(1,2))); //random walk for x ystep = pow(-1,round(random(1,2))); //random walk for y } //the power function here determine if the xstep or ystep valueis positive //or negative by using probability void move() { float angle = noise(loc.x/noiseScale,loc.y/noiseScale) * noiseStrength; loc.x += cos(angle) * xstep; loc.y += sin(angle) * ystep; //The Perlin Noise function

PERLIN NOISE

This sketch uses the Perlin Noise concept to determine the movement instead of complete randomness. The Perlin Noise is structured similar to audio signal, in respect to the function's use of frequency. The trail of the particles result into a more curve like and smooth pattern. The use of frequency enable the fluctuation number(randomness) in a curve like manner.

ď&#x20AC;˛ď&#x20AC;´


2.4 FORCE




MOUSE ATRACTION

2.10




void update() { // Compute a vector that points from location to mouse PVector mouse = new PVector(mouseX,mouseY); PVector acceleration = PVector.sub(mouse,location); // Set magnitude of acceleration acceleration.normalize(); acceleration.mult(0.1);

}

// Velocity changes according to acceleration velocity.add(acceleration); // Limit the velocity by topspeed velocity.limit(topspeed); // Location changes by velocity location.add(velocity);

2.11 Gravitional Attraction

MOUSE ATTRACTION

This sketch explore the potential of the PVector function. The location of the mouse serves as the attractor for the particles and if the mouse is left clicked, the particles will be attracted to the cursor at an accelerated speed. This mimic the gravitional force attracting asteroid hitting or orbiting the planet. 2.11 - http://article.wn.com/view/2012/06/15/Asteroid_zips_past_Earth/ 2.12 - http://www.dailygalaxy.com/my_weblog/2011/04/-new-earth-companion-asteroid-discovered-in-an-odd-orbit.html

ď&#x20AC;˛ď&#x20AC;ˇ

2.12 Orbit


FRICTION & WIND

A

B

C

2.13

This sketch explore the potential of incorporating an external force to the objects. The force is applied toward the acceleration of the object according to its mass as F = m x a. The three forces introduced in this sketch are wind which pushed the objects horizontally, gravity to pull the objects downward and air friction to reduce its acceleration.

ď&#x20AC;˛ď&#x20AC;¸


2.5 OSCILLATIONS




2.14 Oscillations of ripples

Oscillations is a dynamic stability system. Values changes repetitively within a given timeframe resulting a smooth graph of variation in a status of equilibrium. Ripples oscillate according to the force of the initial ripples in a given timeframe. Chemical oscillation records the changes of state of a chemical for a given duration. For scripting, oscillation will provide a varying yet stable variable to the algorithm.

2.15 Belousov-Zhabotinsky reaction - non-linear chemical oscillation

2.14 - http://esfsciencenew.wordpress.com/2009/03/04/earthquake-waves/ 2.15 - http://www.metafysica.nl/dissipative_systems.html

ď&#x20AC;łď&#x20AC;°


DOUBLE PENDULUM

A

B

C

D

E

F

2.16




//based on Shiffman’s sketch Pendulum(PVector origin_, float r_) { origin = origin_.get(); location = new PVector(); r = r_; angle = 5*PI/6; aVelocity = 0.0; aAcceleration = 0.0; damping = 0.999; } void go() { update(); display();

Arbitary damping Arbitary constant

}

Calculate acceleration of pendulum

void update() { float gravity = 0.4; aAcceleration = (-1 * gravity / r) * sin(angle); aVelocity += aAcceleration; aVelocity *= damping; angle += aVelocity; } void display() { location.set(r*sin(angle), r*cos(angle), 0); location.add(origin); stroke(200,10); strokeWeight(0.5); line(origin.x, origin.y, location.x, location.y); ellipseMode(CENTER); fill(250,80,random(150),150); ellipse(location.x, location.y, 5, 5);}}

Increment angle

Polar cartesian conversion

Draw arm Draw pendulum

DOUBLE PENDULUM

This sketch examine the shift from the Cartesian vector coordinate (with x & y) to the polar vector coordinate with angle and the magnitude. This allow me to create sketch like the pendulum swing which require a polar system of coordinate to reference the pendulum and the location of the origin of the string. A second pendulum is then connect to the location of the first pendulum, the resultant is a double pendulum with dynamic movement.




2.6 PARTICLE SYSTEMS




2.17 Render smoke using particle system

Particle Systems Based on Daniel Shiffman’s code class ParticleSystem { ArrayList<Particle> particles; PVector origin; PImage tex; ParticleSystem(int num, PVector v) { particles = new ArrayList(); origin = v.get(); for (int i = 0; i < num; i++) { particles.add(new Particle(origin));

} }

Particle systems allow the generation of large quantities of particles. This would enable the simulation to produce realistic natural phenomena such as fire, smoke, dust... As for complex system, each of the particles can be affected by external influence, such as wind, generating a unpredicted global behaviour.

void run() { Iterator<Particle> it = particles.iterator(); Store the origin point while (it.hasNext()) { Particle p = it.next(); p.run(); if (p.dead()) { In this sketch I added the particle it.remove(); } } } void addParticle() { particles.add(new Particle(origin)); } void addParticle(Particle p) { particles.add(p); }

}

boolean dead() { if (particles.isEmpty()) { return true; } else { return false; } }

system class to manage the particles within the class. I introduce the variable of lifespan which gradually decrease its own value. And once it reaches zero, the particles is remove from the system. The removing and the continuous adding of particles allow the system to reach a state of equilibrium in a sense of a life cycle. And instead of drawing the particle with ellipse(), I use an image function to reference external image as the particle.

Remove particle 2.17 - http://directtovideo.wordpress.com/2009/10/06/a-thoroughly-modern-particle-system/




2.7 AUTONOMOUS AGENTS




AGENT BEHAVIOUR

A

B

C

D

2.18

Autonomous agents have the ability to behave or move autonomous. Their behaviour is influenced by its immediate neighbour and react accordingly. They could also be influenced by global variables as do particle systems.

ď&#x20AC;łď&#x20AC;ś


SEPERATION

2.19

ATTRACTION

2.20

ALIGNMENT

2.21




REPEL AGENT

2.22

A

B

C

A

B

C

2.23




2.24 A school of fishes avoiding their predator

AGENT BEHAVIOUR

This sketch simulate a system with multiple agents reacting with each other. Each of the agents is given three set of different force which will be activate upon each other if the agents is within certain proximity of another agent. The attraction force attract the agents together, the separation force repel against the agents while flocking allow agents to follow the velocity direction of its neighbour. The sketch resemble the movement of pack animal such as flock of birds or fishes. in the second sketch I introduce a repel agents which move randomly and possess of a much larger separation force. This force away the original agents. The result resemble a flock fish evading its predators.

2.24 - http://www.docstoc.com/docs/891588/Black-and-White-School-of-Fish-PPT-Content-Theme-Slide

ď&#x20AC;łď&#x20AC;š


//base on Jose Sanchez’s tutorial void align(float magnitude){ Vec3D steer = new Vec3D(); int count = 0; for (int i = 0; i < particles.size(); i ++) { Parti other = (Parti) particles.get(i); float distance = loc.distanceTo(other.loc); if (distance > 0 && distance<30){ steer.addSelf(other.speed); count++; } } if (count > 0){ steer.scaleSelf(1.0/count); } steer.scaleSelf(magnitude); acc.addSelf(steer);}

2.21 Alignment

Add direction of neighbouring particle

void cohesion(float magnitude) { Vec3D sum = new Vec3D(); int count = 0; for (int i = 0; i < particles.size(); i ++) { Parti other = (Parti) particles.get(i); float distance = loc.distanceTo(other.loc); if (distance > 0 && distance<70){ sum.addSelf(other.loc); count++; } } if (count > 0){ sum.scaleSelf(1.0/count); } Vec3D steer = sum.sub(loc); steer.scaleSelf(magnitude); acc.addSelf(steer); Vec3D stop = sum.sub(loc); stop.scaleSelf(magnitude); bacc.addSelf(stop);}

2.20 Attraction

void seperate(float magnitude){ Vec3D steer = new Vec3D(); int count = 0; for (int i = 0; i < particles.size(); i ++) { Parti other = (Parti) particles.get(i); float distance = loc.distanceTo(other.loc); if (distance > 0 && distance<40){ Vec3D diff = loc.sub(other.loc); diff.normalizeTo(1.0/distance); steer.addSelf(diff); count++; } } if (count > 0){ steer.scaleSelf(1.0/count); } steer.scaleSelf(magnitude); acc.addSelf(steer);}

2.19 Seperation

void flee(float magnitude) { Vec3D stop = new Vec3D(); int count = 0; for (int i = 0; i < repell.size(); i++) { repellWalker temprepell = (repellWalker) repell.get(i); float distance = loc.distanceTo(temprepell.loc); if (distance > 0 && distance < 200) { Vec3D diff = loc.sub(temprepell.loc); diff.normalizeTo(1.0/distance); stop.addSelf(diff); count ++; } if (count > 0) { stop.scaleSelf(1.0/count); } stop.scaleSelf(magnitude); acc.addSelf(stop); } }

2.22 Repell Agents




2.8 CELLULAR AUTOMATA




2.1X Wolfram's rule 30 Cellular Automata

The pattern of some seashells resemble the pattern of Wolfram's rule 30 Cellular Automata. 2.25 Seashell

Cellular Automata is a dynamical system that is discrete in both space and time. It consists of a regular grid of cells which has a finite number of state, such as on and off or in computational term 0 and 1. The changes of the state are triggered in reponse to the condition of its immediate neighbours and the current state of the cell. In 1D this would be the two cells on its right and left, while in 2D this would be the eight cells or its perimeter, top left, top, top right, right, bottom right and so forth. Cellular Automata is developed by Ulam and von Neumann in the 1940s as a framework to study the process of production and self-replicating system. The system concentrates on the simplest mathematical framework that allows information to reproduce.

2.25 - http://en.wikipedia.org/wiki/File:Textile_cone.JPG

ď&#x20AC;´ď&#x20AC;˛


A

A

B

B

2.26



2.27


GAME OF LIFE

The Game of Life developed by John Horton Conway in the 70s is a cellular automation. The cells in here have 2 states (live and die) and the cell changes its state according to the condition of its neighbour and a set of fixed rules: 1. If a living cell has less than 2 neighbours, it dies of loneliness. 2. If a Living cell has more than 3 neighbours, it dies of overcrowding. 3. If a living cell has exactly 3 neighbours, it remains unchanged. 2.26 The two images here are the Generative Art by Jonathan McCabe. The art is generated by using the principle of Cellular Automata. Each pixel represents the state of 4 cells of 4 cellular automata which have their own transition table. The history of the state of the cells also changes the transition table and updates the rule. This results in a dynamic juxtaposition of contrasting colour. 2.27 The GrayScott sketch resembles the pattern produced by the reaction and diffusion of chemical species. Though the algorithm behind this sketch maybe more complex, the core principle is the same with CA. The cells change its state according to its current state and the state of its local neighbours.

4. If a dead cell has exactly 3 neighbours, it reborns. The initial state of cell is determined by a probability of 50/50. In the sketch, many cells die leaving patches of living cells dispersed on the sketch. Eventually the sketch will come to an equilibrium where many of the cells become stable or form a pattern that only oscillates in 2 or more states. There is no particular 'equilibrium pattern' in the sketch, it generates different result when I run it. This is perhaps the result of the random probability of the cell initial states and its local relationship with its immediate neighbours instead of a global variables that dictate its changes.

2.26 - http://neurofuture.blogspot.com.au/2007/02/cellular-automata.html 2.27 - Toxiclib GrayScottToneMap processing sketch

ď&#x20AC;´ď&#x20AC;´


A

Initial state

B

Cells dying

C

Eventual Pattern



2.28


//based on tutorial by Jose Sanchez class CA{ Vec3D loc; int x; int y; int type = 0; int futType = 0; CA(Vec3D _loc, int _x,int _y){ loc = _loc; x = _x; y = _y;

}

float rnd = random(100); if(rnd < 50){ type = 1; }

void run (){ display(); } void updateType(){ type = futType; } void evalN(){ int count = 0; if(grid[(x+cols-1)%cols][(y+rows-1)%rows].type == 1) count ++; if(grid[(x+cols)%cols][(y+rows-1)%rows].type == 1) count ++; if(grid[(x+cols+1)%cols][(y+rows-1)%rows].type == 1) count ++; if(grid[(x+cols-1)%cols][(y+rows)%rows].type == 1) count ++; if(grid[(x+cols+1)%cols][(y+rows)%rows].type == 1) count ++; if(grid[(x+cols-1)%cols][(y+rows+1)%rows].type == 1) count ++; if(grid[(x+cols)%cols][(y+rows+1)%rows].type == 1) count ++; if(grid[(x+cols+1)%cols][(y+rows+1)%rows].type == 1) count ++; if (type == futType = } if (type == futType = } if (type == futType = } if (type == futType = }

}

1 && count <2){ 0; 1 && count >3){ 0; 1 && count ==3){ 1;

Rule 1

0 && count ==3){ 1;

Rule 2

} void display(){ if(type ==1){ stroke(255); strokeWeight(2); point(loc.x,loc.y); } }

Rule 3 Rule 4

ď&#x20AC;´ď&#x20AC;ś


2.9 FRACTALS

2.29 - http://www.sfu.ca/~rpyke/335/fractal_landscape/fractal_lands2.html 2.30 - http://www.boiledbeans.net/2009/01/28/log8log2/ 2.31 - http://classes.yale.edu/fractals/panorama/Architecture/IndianArch/India17.html 2.32 - http://en.wikipedia.org/wiki/Mandelbrot_set 2.33 - http://en.wikipedia.org/wiki/Mandelbulb




Fractals are self similar pattern in which the pattern is exactly the same in every scale. This is the result of the recursion of simple algorithm. The complex outcome is the result of the iteration of the recursive process of the simple algorithm.

2.29

2.29 Fractal Landscape - is the natural like surface or landscape generated by stochastic algorithm with fractal behaviour. It mimics the natural landscape by generating non-deterministic surfaces. In a sense this resembles the process of the generation of form in nature. 2.30 Lung - the veins in the human lung resemble the fractal pattern

2.30

2.31 Hindu Temple - Many architectures of the past exhibit fractal structure. The temple is decorated by self-recursive ornaments which are identical in many scales. The fractal aspect of the architecture also reflects the fractal nature of Hindu cosmology. 2.32 Mandelbrot set - The art is generated by algorithm with fractal behaviour. The result is a pattern that is identical in every scale. 2.33 Mandelbulb - Mandelbulb is the 3D exploration of the Mandelbrot set

2.32

2.33

2.31

ď&#x20AC;´ď&#x20AC;¸


2.34

2.35




2.34 //based on tutorial by Jose Sanchez void updatePt(){ Vec3D m = new Vec3D (mouseX, mouseY, 0); float d = m.distanceTo(pt1); if(mousePressed){ if(d < 30){ pt1 = m; } } Location of start point and end point float d2 = m.distanceTo(pt2); if(mousePressed){ if(d2 < 30){ pt2 = m; } } } void iterate(Vec3D p1, Vec3D p2, int iterations){ if(iterations > 0){ Vec3D oneThird = ptBetween(p1,p2,0.333,0); Vec3D twoThird = ptBetween(p1,p2,0.666,0); Vec3D halfUp = ptBetween(p1,p2,0.5,-0.2); iterate(p1, oneThird, iterations-1); iterate(oneThird, halfUp, iterations-1); iterate(halfUp, twoThird, iterations-1); iterate(twoThird, p2, iterations-1); if(iterations ==1){ stroke(255); strokeWeight(1); vLine(p1, oneThird); vLine(oneThird, halfUp); vLine(halfUp, twoThird); vLine(twoThird, p2); }

Recursion

}

2.34 This sketch is a basic exploration of the recursive behaviour in fractals with lines divided to form a series of triangle, the bottom line of the triangles is then erased to form one continuous line. The outcome is identical with each run.

}

Vec3D ptBetween(Vec3D p1, Vec3D p2, float ratio, float ratio2){ Vec3D dif = p2.sub(p1); float d = p1.distanceTo(p2); dif.normalize(); dif.scaleSelf(d*ratio); Vec3D rot = p2.sub(p1); rot.normalize(); Fractal properties rot.rotateZ(PI/2); rot.scaleSelf(d*ratio2); dif.addSelf(rot); dif.addSelf(p1); return dif; }

2.35 //based on Daniel Shiffman sketch void newTree() { background(0); stroke(80,random(255),250,20); pushMatrix(); translate(width/2, height); branch(250); popMatrix();}

The initial stage of the tree, the h value determine the length of the branches

Branches iterate with a

smaller h value at each void branch(float h) { iteration float sw = map(h, 2, 120, 1, 5); strokeWeight(sw); line(0, 0, 0, -h); translate(0, -h); h *= 0.66f; if (h > 1) { int n = int(random(1, 5)); for (int i = 0; i < n; i++) { float theta = random(-PI/2, PI/2); pushMatrix(); rotate(theta); branch(h); popMatrix(); } }}

2.35 Instead of a fixed length and fixed angle, this simulation uses randomized length and angle to generate a more natural looking form. And as those variables are randomized, the final outcome of each run is unique and unpredictable.

ď&#x20AC;ľď&#x20AC;°


2.10 GENETIC ALGORITHMS




2.36 Evolutionary bone changes in horses

Genetic algorithm is a form of artificial evolution or AI based on Darwinian 'survival of the fittest'. Under evolution and natural selection, the fittest, i.e. best adapted to the given environment will survive and have a higher chance to reproduce. The next generation will carry the traits of its parents and will mutate through generations. The eventual outcome is the obsolescence and the extinction of the 'unfit' population. Organism produces genotype and phenotype. Genotype is the coded representation of a problem solution. In biology, this will be the DNA which contains the traits of parent organism and instruction for the development of an organism. Phenotype is then produced as the expression of the organism's genotype and the organism is reproduced selectively according to the fitness criteria. In coding, this begins with a population of randomly generated agents. Each agent is then evaluated by its fitness. Multiple agents with desired fitness level are then selected to generate new population with the traits of their parents and random chance of mutation. The process will be iterated in generations to produces or evolve the most desired outcome. In architecture, this will enable architects to generate complex solution to an array of criteria. Through generations of evolution and mutation, the algorithm will produce a solution that is the equilibrium of the array of criteria. 2.36 - http://commons.wikimedia.org/wiki/File:PSM_V15_D037_Evolutionary_bone_changes_in_horses.jpg

ď&#x20AC;ľď&#x20AC;˛


2.37

Strandbeest Over time, these skeletons have become increasingly better at surviving the elements such as storms and water, and eventually I want to put these animals out in herds on the beach so they will live their own lives. Theo Jansen5 Strandbeest designed and built by Dutch artist Theo Jansen is a series of wind-powered 'animals' made of plastic tubes. The animals are evolving, they are constantly improved and through generations, they have become excellently adapted to their sandy beach environment. Jansen uses genetic algorithm to the leg system that enables the animal to move. The genetic algorithm allows the leg system to evolve to the most suitable configuration and to determine the length of each of the components of the leg system.

2.37 - http://www.designboom.com/art/theo-jansens-animarae-adulari-strandbeest-has-a-pivoting-neck/ 2.38 - http://couleurblind.com/2011/11/08/theo-jansen/ 2.39 - http://www.archdaily.com/167928/theo-jansen-exhibition-the-beach-animal-that-eats-wind-theo-jansen-with-earthscape/

ď&#x20AC;ľď&#x20AC;ł

QUOTE 5 - http://www.strandbeest.com/

2.38

2.39


A

B

C

D

2.40

The sketch is tweak a of Daniel Shiffman's smart rocket sketch. The particles in the sketch move in a random direction. In each generation, the fitness of the particles are evaluated according to their proximity to the target. The traits (direction of movement) of the particles with the highest fitness level will pass to the next generation. Eventually all the particles will be able to reach the target in the most efficient way, this is evidenced by the high concentration of colour toward the target.

ď&#x20AC;ľď&#x20AC;´


//based on Daniel Shiffman’s smart rocket

Array to hold the current population

class Population { float mutationRate; Rocket[] population; ArrayList<Rocket> matingPool; int generations;

Arraylist for mating pool Initialize the population Create new particle

Population(float m, int num) { mutationRate = m; population = new Rocket[num]; matingPool = new ArrayList<Rocket>(); generations = 0; for (int i = 0; i < population.length; i++) { PVector location = new PVector(width/2,height+20); population[i] = new Rocket(location, new DNA());

}

}

void live () { for (int i = 0; i < population.length; i++) { population[i].run(); } } void fitness() { for (int i = 0; i < population.length; i++) { population[i].fitness(); } }

Calculate Fitness for each particles Generate mating pool

void selection() { matingPool.clear(); float maxFitness = getMaxFitness(); Calculate total fitness of whole population for (int i = 0; i < population.length; i++) { float fitnessNormal = map(population[i].getFitness(),0,maxFitness,0,1); int n = (int) (fitnessNormal * 100); The higher the Fitness, the more for (int j = 0; j < n; j++) { entries to mating pool, more matingPool.add(population[i]); } } }

likely to be pick as parent

void reproduction() { for (int i = 0; i < population.length; i++) { int m = int(random(matingPool.size())); int d = int(random(matingPool.size())); Rocket mom = matingPool.get(m); Rocket dad = matingPool.get(d); DNA momgenes = mom.getDNA(); DNA dadgenes = dad.getDNA(); DNA child = momgenes.crossover(dadgenes); child.mutate(mutationRate); PVector location = new PVector(width/2,height+20); population[i] = new Rocket(location, child); } generations++; }

Generate next generation Pick two parents Get their DNA Mate their DNA Mutate their DNA

int getGenerations() { return generations; } float getMaxFitness() { float record = 0; for (int i = 0; i < population.length; i++) { if(population[i].getFitness() > record) { record = population[i].getFitness(); return record; }}



Find the highest fitness

}

}


class DNA { PVector[] genes; float maxforce = 0.1; DNA() { genes = new PVector[lifetime]; for (int i = 0; i < genes.length; i++) { float angle = random(TWO_PI); genes[i] = new PVector(cos(angle), sin(angle)); genes[i].mult(random(0, maxforce)); } } DNA(PVector[] newgenes) { genes = newgenes; }

Create new DNA sequence with two genes

DNA crossover(DNA partner) { PVector[] child = new PVector[genes.length]; int crossover = int(random(genes.length)); for (int i = 0; i < genes.length; i++) { if (i > crossover) child[i] = genes[i]; else child[i] = partner.genes[i]; } DNA newgenes = new DNA(child); return newgenes; } void mutate(float m) { for (int i = 0; i < genes.length; i++) { if (random(1) < m) { float angle = random(TWO_PI); genes[i] = new PVector(cos(angle), sin(angle)); genes[i].mult(random(0, maxforce)); } }

Mutate the genes

}}

class Rocket { PVector location; PVector velocity; PVector acceleration; float r; float fitness; DNA dna; int geneCounter = 0; boolean hitTarget = false; Rocket(PVector l, DNA dna_) { acceleration = new PVector(); velocity = new PVector(); location = l.get(); r = 4; dna = dna_; }

Fitness is determined by proximity to target

void fitness() { float d = dist(location.x, location.y, target.x, target.y); fitness = pow(1/d, 2); } void run() { checkTarget(); if (!hitTarget) { applyForce(dna.genes[geneCounter]); geneCounter = (geneCounter + 1) % dna.genes.length; update(); } Check if particles reach target display(); } void checkTarget() { float d = dist(location.x, location.y, target.x, target.y); if (d < 12) { hitTarget = true; } }

ď&#x20AC;ľď&#x20AC;ś


2.11 NEURAL NETWORKS




Neural Network is developed to solve task that is easy for the human mind but hard for computer. One of such task will be pattern recognition. Artificial neural network mimics the neural network found in nervous system. Each of the multiple interlinking neurons only performs simple tasks, but the network as a work can perform much complex task. The neural network is a complex system in which the simple processing elements exhibit complex global behaviour. The properties of the neuron are changed by information received, the neuron then processes the information with reference to its connecting neighbours. The changes in the property of each neuron is recorded and it will affect the outcome of the processed information. Neural network can also be trained with a learning algorithm that modifies neural connection based on experience. 2.41 AANN

2.41 AANN - Analog Artificial Neural Network is an electronic sculpture that mimics small neural cluster. The sculpture picks up sound and detects light through its receiver on its front, then the information is being processed and passed on to the rear through 45 neurons. The sculpture then generates sound from the 3 speakers in its rear. The sculpture produces interesting result when it begins talking to itself as the sound it produced becomes louder and it also generates interesting patterns with its led light on each of the neurons 2.42 Pyramidal neurons - biological neural network

2.42 Pyramidal neurons 2.41 - http://www.steim.org/projectblog/2007/09/27/aann-a-steim-residency-project-report-by-phil-stearns/ 2.42 - http://en.wikipedia.org/wiki/File:Smi32neuron.jpg

ď&#x20AC;ľď&#x20AC;¸


2.43

2.44




2.45

This sketch visualizes the neural network in action, it does not generate complex outcome but does show how the flows of signals are processed and passed on through the network of neurons. This mimics the nervous system, how information is processed and passed on from sensors to the brain. The first image shows the initial stage of the neural network with each of the neurons moving randomly. The second image shows signals being moving through the network of neurons. The last image shows the effect of decreasing number of neurons will do to the moving of signals. The signals require more time to process as the network being congested. This mimics the death of neuron cells in a nervous system which slows down the reaction time of a person. This sketch will be more realistic if all the neurons have a finite lifespan and connection of the neurons will break apart if the neurons spawn to far apart.

ď&#x20AC;śď&#x20AC;°


// Tweak of http://www.openprocessing.org/sketch/65274 class Neuron { int refractory; float charge, threshold; float x, y, originalx, originaly; float xspeed = random(2); float yspeed = random(2); int id; Neuron[] connections; int num_connections; Neuron(int newid, int newx, int newy) { id = newid; x = newx; y = newy; originalx = x; originaly = y; num_connections = 0; charge = 0; threshold = random(START_THRESHOLD); refractory = 0; } void draw() { update(); move(); if (refractory > 0) { Check if there is signal in the neuron fill(refractory,255-refractory,0); stroke(refractory,255-refractory,0); } else { noFill(); stroke(0,255,0); } ellipse(x, y, NEURON_SIZE, NEURON_SIZE); noFill(); stroke(255*(threshold/START_THRESHOLD), num_connections, y, 10); for (int i=0; i<num_connections; i++) line(x, y, connections[i].x, connections[i].y); } Draw Network void update() { Signal fading out if (refractory > 0) { refractory--; } else { if (charge > threshold) { Adding charge to signals for (int i=0; i<num_connections; i++) signals.add(new Signal(this, connections[i], random(FIRING_CHARGE))); charge = 0; refractory = int(random(REFRACTORY_TIME)); fill(255,255,255,200); ellipse(x,y,2*NEURON_SIZE,2*NEURON_SIZE); } } } void addCharge(float c) if (refractory == 0) charge += c; }

{

Function to add charge in the initial stage

void move() { int xstep = int(random(0,3))-1; //random walk for x int ystep = int (random(0,3))-1; //random walk for y x += xstep*xspeed; // acceleration y += ystep*yspeed; if ((x > width-10) || (x < 10)) { xspeed = xspeed * -1; } if ((y > height-10) || (y < 10)) { yspeed = yspeed * -1; }}}

ď&#x20AC;śď&#x20AC;ą


class Signal{ Neuron origin, destination; boolean alive; float progress, distance, charge; Signal(Neuron o, Neuron d, float c) origin = o; destination = d; progress = 0; distance = dist(o.x,o.y,d.x,d.y); charge = c; alive = true; }

{

void draw() { update(); stroke(origin.x,origin.y,charge*10,255*(charge/FIRING_CHARGE)); float signalx = lerp(origin.x,destination.x,progress/distance); float signaly = lerp(origin.y,destination.y,progress/distance); ellipse(signalx, signaly, SIGNAL_SIZE, SIGNAL_SIZE); } void update() { progress += SPEED_CONSTANT+(distance-progress)/SIGNAL_SPEED; if (progress > distance) { alive = false; destination.addCharge(charge); } }}

Draw signals Signals move

Passing charge to destination neuron

void makeConnections(){ Neuron origin, destination;

Construct neuron network for signals

for (int i=0; i<NUM_NEURONS; i++) { origin = neurons[i]; origin.connections = new Neuron[0];

for (int j=0; j<NUM_NEURONS; j++) { destination = neurons[j]; if (origin.id != destination.id) { if (dist(origin.x, origin.y, destination.x, destination.y) < 80) { origin.connections = (Neuron[])append(origin.connections, neurons[j]); origin.num_connections++; } } } }} void drawSignals(){ Signal current; for (int i=0; i<signals.size(); i++) current = signals.get(i); current.update(); if (!current.alive) signals.remove(i); i--; } }

{

{

stroke(0,255,0); for (int i=0; i<signals.size(); i++) signals.get(i).draw();}

ď&#x20AC;śď&#x20AC;˛





3.0 EMERGENT PROJECT

//3.1 Animal Architecture //3.2 Stigmergy //3.3 Precedents //3.4 Project 1 //3.5 Project 2 //3.6 Project 3 Background: http://6legs2many.wordpress.com/tag/solenopsis-invicta/ A mountain of exposed fire ants, mounded up on the brood pile to conserve moisture.




3.1 ANIMAL ARCHITECTURE

AGENT BEHAVIOUR & ANIMAL ARCHITECTURE Animals have been building impressive structures that response to the environment. How simple organism such as termite can construct such a complex system? We should look at the termite colony as a complex system comprise of numerous individual agents, we can see each agent perform simple task at the same time response to one another, and through the collective behaviour of the agents, a complex and emergent system is built. TERMITE MOULD 1.1 - A termite colony is a system comprises of different classes of termites performing different tasks - queen, warriors and workers. They communicate with each other by leaving a chemical trail with which information is exchanged and the colony articulated. The colony acts as a whole as a single organism performing multiple tasks, like fighting off intruders, finding food and building the mould. As an individual agents, each termite collects information of the environment and feeds back to the system. The mould is the result of the collaboration of the agents influenced by the information of the surrounding environment. SOCIABLE WEAVERS NEST 1.2 - Unlike the termite colony, the sociable weavers have a rather loose social structure. Each compartment of the nest normally comprises of two weavers and their offspring. The weavers do not feed in information into the system as the termites do. Their behaviour is influenced by the structure built upon by other weavers. In a sense, the weavers have a more individualistic behaviour. The collaboration of the weavers is therefore driven by mutual benefit of the individuals rather than the survival of the colony as a whole.

3.1 - http://science.howstuffworks.com/environmental/life/zoology/insects-arachnids/termite3.htm 3.2 - http://victoriayeager.com/social-weavers-namibia-africa-a-social-study/

ď&#x20AC;śď&#x20AC;ľ


3.1

3.2




3.2 STIGMERGY

Stigmergy is a form of self-organization in which it produces a complex and seemingly intelligent structure without any form of a 'grand planning' or control. Instead, it is a collaboration of some extremely simple agents. Each agent has a simple set of behaviours, and only reacts with its immediate neighbour. The resultant is an unpredictable and emergent pattern. One of the best examples of Stigmergy in nature is the 'path finding' and 'path following' behaviour of ants. Ants exchange information with each other by leaving 'pheromones' on its route to the nest of the colony after foraging for food. The pheromone stimulate ants passing by to follow the trail toward the food source, the ant then leave pheromone on its path with which the intensity of pheromones accumulated with more ants following the same path. Overtime, it creates a network of trails linking the nest and the food sources in the most efficient manner. Termites follow the similar method to build their complex nest. Stigmergy behaviour generates complex solution and emergent pattern and is one of the key concepts in the field of swarm intelligent. This could open up a new horizon and ultimately change the way we approach architecture. Architecture follows a top-down design approach. We 'design' the predetermined form, the predetermined structure and predetermined brief. Can we utilize stigmergy behaviour and swarm intelligent to generate complex solution which will better address the context of the environment and formulate an emergent design in architecture? The following projects of this chapter will explore the theory by developing sketches of computational simulation utilizing the coding language of processing.

ď&#x20AC;śď&#x20AC;ˇ


3.4

3.3

3.5

3.7 3.6

3.3 PRECEDENTS

LEARNING FROM ANTS 3.3-4 - LYCS ARCHITECTURE RAILWAY PAVILION 2010 SHANGHAI EXPO 3.5-7 Learning from ants is a research initiated by LYCS to study the space created by the tunnelling ants. By observation, they study the behaviour of the ants, how the colony of ants interacts with each other. They then run a computational simulation adopting the ants' behaviour to the particles in the simulation. Based on the pattern created by the simulation, they designed the Railway Pavilion by using the pattern as the circulation of space. The concept behind the design is to use 'the ants' as a metaphoric mean to create dynamic space which is the result of the interactions amongst each occupant. 3.3-7 http://http://lycs-arc.com

ď&#x20AC;śď&#x20AC;¸


3.8

3.9

WEB MORPHGENESIS - CHENGHAN YANG The project focuses on a research of non-hierarchical design system and what aesthetics such a system gives. It employed a non-linear system in which agents interact with each other to form an emergent pattern. The pattern (structure) of the design is the resultant of the local relationships between agents: attracting, detracting and repulsing effect amongst agents. The design is agents driven rather than a top-down approach. This allow the generation of complex and emergent pattern. 3.8-10 http://www.yangchenghan.com/

ď&#x20AC;śď&#x20AC;š

3.10


3.11

LET'S WORK TOGETHER A STIGMERGY APPROACH TO ACCOUSTIC DESIGN, JASON LIM 3.12

Multi-agent based design has been explored to achieve emergent and aesthetically pleasing architectural design. The complex system of agent based simulation can also achieve better understanding of the performance of architecture through the mean of simulation. This ultimately lead to a true 'performance driven' design. In this research, Lim explored the application of agent based modeling/simulation technique to the domain of acoustic design. The simulation is driven by the concept of stigmergy, of which stochastic agents(sound rays) are generated from sound source and the acoustic performance of the space is evaluated by mapping the interaction of rays with the seats and the structure. With the information fed in to the system, the geometry of the ceiling is then altered according to the information as part of the simulation process. Through multiple iterations, a state of equilibrium emerged with the ceiling geometry which has the optimum acoustic performance. 3.11 Viipuri Library, Alvar Aalto 3.12 Simulation base on the Viipuri Library 3.13 The alternation of the ceiling as the result of the simulation

3.11 http://www.public.iastate.edu/

3.13

3.12-3 Let's Work Together - A STIGMERGY APPROACH TO ACCOUSTICESIGN, Jason LIM, ETH Zurich

ď&#x20AC;ˇď&#x20AC;°


3.4 PROJECT 1

REPEL ATTRACT

REPEL

ATTRACT

THE PROJECT - The goal of the project is to create a complex system comprising of multiple agents interacting with each other to form an emergent outcome. Right now the agents will attract to each other if they swarm into the 'blue zone' and repel against each other if they reach the 'red zone'. A variable is introduced for the lifespan of the agents, if the agent is within a certain distance with another agent, its lifespan decreases, and eventually becomes zero. If the lifespan is zero, the agent become static and possess of a greater attraction force. Eventually all the agents will become static and lines will be drawn between agents to 'document' the emergent result of the system. 3.14 the initial stage of the sketch, 3.15 the final outcome of the sketch, 3.16 Test on 3D

ď&#x20AC;ˇď&#x20AC;ą


3.14

3.15

3.16




3.17

For 3.17-18 The looping of the backround is turned off to create the path of the movement of the particles from its initial stage to the final stage.

ď&#x20AC;ˇď&#x20AC;ł

3.18


3.19

3.20

3.19-21 Using the iteration function to allow particle to be removed once its lifespan is exceed, then spawning new particles at random location.

3.21

ď&#x20AC;ˇď&#x20AC;´


3.5 PROJECT 2

//Base Image sketch by Gwyllim

The code here is a tweak of Gwyllim Jahn's code of the base image. The code here simulate the stigmergy behaviour through an array of particles. The particles leave a trails pheromone with its intensity determined by the brightness of the pixel of the base image on the very spot. The pheromone stimulate pass by particles to follow the trail. Initially the image fade function is turned on to allow the decrease of pheromone intensity over time. This allow the system to form an equilibrium where the pattern of the path becomes stable. I turn off the image fade function to study the relationship between the particles the pheromone trail instead.

//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; //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; x = constrain(x,0,width-1); int y = floor(location.y)+j; y = constrain(y,0,height-1); //check to see if value //scale float v PVector

this is the smallest current by the distance to the value = world.getAt(x,y); toV = new PVector(i,j);

//limit the angle of vision if(PVector.angleBetween(toV,velocity)<PI/2){ //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); toBest = toV; maxV = v;}}}}} //only effect if finding something above a tolerance if(maxV>20){ applyForce(toBest);}} void modWorld(){ //checks for edges if(lastPos.x<width-1 && lastPos.y<height-1 && lastPos.x>0 && lastPos.y >0) world.modAt(floor(lastPos.x),floor(lastPos.y),50);}}

ď&#x20AC;ˇď&#x20AC;ľ


100 particles

3.22

1000 particles

3.23




//A tweak of Gwyllim’s base image

Born particle

Remove particle when dead

if (pop.size()< numMovers) { pop.add(new Mover (new PVector(random(width),random(height)), new PVector(random(-maxSpeed,maxSpeed),random(-maxSpeed,maxSpeed)), 1));} Iterator<Mover> it = pop.iterator(); while (it.hasNext()){ Mover m = it.next(); if(m.isDead())it.remove();} /////////////////////////////////////////

The code here is the tweak of the base image sketch. I have added cohesion and separation force to the particles so that it will interact with each other. The forces are only activated if two particles are within certain radius. For the cohesion force, it's 70 pixels, while the separation force is 10 pixel. Therefore the particles is more likely to attract to each other, but repel against each once it reaches the threshold of the separation force. The third function I add here is the checkDis () function. If the distance between is less than the variable stated in the function, the variable 'lifespan' decrease and if lifespan is below zero, the particle is then removed. To create an equilibrium within the system, new particles are added if the number of particles is smaller than its initial size. For the following sketches, I have changed the intensity of the cohesion force, changed the initial spawning location of the particles to a fixed location and increased the number of the search radius.



boolean isDead() { if (lifespan <= 0.0) { return true; } else { return false;}}

Check if particle is dead Repell particles

void seperate(float magnitude){ PVector steer = new PVector(); int count = 0; for (int i = 0; i < pop.size(); i ++) { Mover other = (Mover) pop.get(i); float distance = location.dist(other.location); if (distance > 0 && distance<10){ PVector diff = location.get(); diff.sub(other.location); diff.normalize(); steer.add(diff); count++; } } if (count > 0){ steer.mult(1.0/count); } Attract particles steer.mult(magnitude); acceleration.add(steer);} void cohesion(float magnitude) { PVector sum = new PVector(); int count = 0; for (int i = 0; i < pop.size(); i ++) { Mover other = (Mover) pop.get(i); float distance = location.dist(other.location); if (distance > 0 && distance<70){ sum.add(other.location); count++; } } if (count > 0){ sum.mult(1.0/count); } sum.sub(location); sum.mult(magnitude); acceleration.add(sum); } void checkDis(){ for (int i = 0; i < pop.size(); i ++) { Mover other = (Mover) pop.get(i); float distance = location.dist(other.location); if (distance > 0 && distance<8){ lifespan-=55; } }}


A

3.24

Adding Cohesion and Seperation force

B

3.25




A

C

B

3.26

100 particles, turn off image fade

C

A

B

1000 particles, turn off image fade

ď&#x20AC;ˇď&#x20AC;š

3.27


B

A

3.28

1000 particles with stronger cohesion force

C

ď&#x20AC;¸ď&#x20AC;°


C New cluster

Spawning at same location Spawning off the edge 3.29

A



B


B

Spawning at same location without seperation and cohension force 3.30

A

B

A

3.31

Spawning at same location with image fade

ď&#x20AC;¸ď&#x20AC;˛


Increase search radius Forming a continous path 3.32

ď&#x20AC;¸ď&#x20AC;ł


3.6 PROJECT 3

3.33 The out of Arfrica theory, the spread of human

L-system is implemented as a framework for the growth of agents, allowing agents of each generation to trace back to its origin or seed. But the focus here is the ability of one agent being autonomous, the agent moves and settles as influenced by its neighbours and the environment. This resembles the spread of civilizations, cities and cultures. Yet architecture become static, static in a sense that it does not response to changes, does not adapt. Architecture should have dynamic intelligence and perform as an organism constantly evolving, expanding or shrinking according to the environment. It should not be as a statute that remains steadfast against time but as a living organism that evolves overtime for greater benefit of its occupants. This project explores the idea of growth in architecture. We as architect plants the seed, and the architecture will grow in relation to the need and desire of the occupants and to the environment. The aim is to limit the subjective judgement of architect, allowing the generation of a complex and dynamic system that best adapts to the environment while satisfying the needs of the occupants. 3.33 - http://en.wikipedia.org/wiki/File:Map-of-human-migrations.jpg

ď&#x20AC;¸ď&#x20AC;´


3.34

Walking City - Archigram

3.35 3.34- http://www.archigram.net/projects_pages/walking_city.html 3.35- http://www.archigram.net/projects_pages/walking_city_4.html

ď&#x20AC;¸ď&#x20AC;ľ

The walking city consists of intelligent buildings in the form of a self contained living pod. The buildings can roam around in the city to find its suitable environment and adequate recourses, resembling animal migration. The proposal took inspiration from insects and machine and as a interpretation of Le Corbusier's 'machine Ă  habiter'. The proposal explored the concept of architecture as a living organism with dynamic intelligence which parallel to the philosophy of my project.


L-System L-system is a parallel rewriting system similar to fractals. It can be used to model process of plant growth as well as morphology of a variety of organism. The L system begins with one particle, the seed or origin, then new particles spawn with each iteration and connect to the origin forming branches. The branches may have a set of different properties, in my sketch they are the angles and the length of the branches. 3.33-34 L-system Plant by Diana Lange - the art mimics the growth of plant

3.36

3.37 3.36- http://www.diana-lange.de/portfolio/generative/nature_of_code/nature.html 3.37- http://www.diana-lange.de/portfolio/generative/nature_of_code/nature.html

ď&#x20AC;¸ď&#x20AC;ś


B

A

3.38 From 4th generation to the 15th generation

A

3.39 Experimenting with different angle in the 25th generation

B

ď&#x20AC;¸ď&#x20AC;ˇ


//based on tutorial by Jose Sanchez Stick(Vec3D _loc, Vec3D _vel, loc = _loc; vel = _vel; oriLoc = _loc.copy(); generations = _generations; type = _type; updateDir(); updateLoc(); spawn(); } void run(){ display();

int _generations, String _type){

Function that only run once

}

void spawn(){ if(generations > 0){ if(type == “A”){ Vec3D v = loc.copy(); Vec3D iniVel = vel.copy(); Stick newBob = new Stick(v, iniVel, generations-1, “A”); allBobs.add(newBob); Vec3D v2 = loc.copy(); Vec3D iniVel2 = vel.copy(); Stick newBob2 = new Stick(v2, iniVel2, generations-1, “B”); allBobs.add(newBob2); } if(type == “B”){ Vec3D v = loc.copy(); Vec3D iniVel = vel.copy(); Stick newBob = new Stick(v, iniVel, allBobs.add(newBob); }

Spawning different 'type' of cell each with distinctive properties

generations-1, “C”);

if(type == “C”){ Vec3D v = loc.copy(); Vec3D iniVel = vel.copy(); Stick newBob = new Stick(v, iniVel, generations-1, “A”); allBobs.add(newBob); } } } void updateDir(){ if(type == “A”){ float angle11 = radians(0); float angle12 = radians(ANGLE1); float angle13 = radians(0); vel.rotateX(angle11); vel.rotateY(angle12); vel.rotateZ(angle13); vel.normalize(); vel.scaleSelf(100); }

Variables for velocity angle

if(type == “B”){ float angle11 = radians(0); float angle12 = radians(0); float angle13 = radians(ANGLE2); vel.rotateX(angle11); vel.rotateY(angle12); vel.rotateZ(angle13); vel.normalize(); vel.scaleSelf(20); } if(type == “C”){ float angle11 = radians(ANGLE3); float angle12 = radians(0); float angle13 = radians(0); vel.rotateX(angle11); vel.rotateY(angle12); vel.rotateZ(angle13); vel.normalize(); vel.scaleSelf(40); } } void updateLoc(){ loc.addSelf(vel);

Variables for the length of branches

}




A

I extend the L-system sketch to incorporate flocking behaviour. Instead of a static sketch, my aim is to create dynamic sketch in which the location of new branches is determined by the flocking behaviour of particles. A lifespan is given to each of the seed particle, when its lifespan is below zero, the particle becomes static and new particles spawn from the last location of the seed particle.

ď&#x20AC;¸ď&#x20AC;š

B


C

3.40




3.41 Increase Attraction

3.42 Increase Seperation




3.43 Increase Alignment

R2

3.44 Particles spawn with greater alignment at each generation




3.45 Particles spawn with greater Attraction at each generation

R1

3.46 Particles spawn with greater Attraction and alignment at each generation

ď&#x20AC;šď&#x20AC;ł


R1

R2

3.47 Exporting the processing sketch to Rhino

ď&#x20AC;šď&#x20AC;´


R1

R2

3.48 3D Rendering




//based on tutorial by Jose Sanchez: L-system & agent behaviour void run(){ display(); drawline(); if (lifespan > 0 ){ seperate(10); cohesion(0.001); align(0.1* change); move(); } if(lifespan==0)spawn(); lifespan--;} void spawn() { if (generations> 0){ if(type == “A”){ Vec3D v = loc.copy(); Parti p = new Parti(v, generations-1, ls, “A”, change * 1.5); particles.add(p); Vec3D v1 = loc.copy(); int ls1 = (int) random(600,700); Parti p1 = new Parti(v1, generations-1, ls1, “B”, change * 1.5); particles.add(p1); }

Spawning different 'type' of cell each with distinctive properties

if(type == “B”){ Vec3D v = loc.copy(); int ls2 = (int) random(5,40); Parti p = new Parti(v, generations-1, ls2, “C”, change * 1.5); particles.add(p); } if(type == “C”){ Vec3D v = loc.copy(); int ls3 = (int) random(300,400); Parti p = new Parti(v, generations-1, ls3, “A”, change * 1.5); particles.add(p); } }} void cohesion(float magnitude) { Vec3D sum = new Vec3D(); int count = 0; for (int i = 0; i < particles.size(); i ++) { Parti other = (Parti) particles.get(i); float distance = loc.distanceTo(other.loc); if (distance > 0 && distance<70){ sum.addSelf(other.loc); count++; } } if (count > 0){ sum.scaleSelf(1.0/count); } Vec3D steer = sum.sub(loc); steer.scaleSelf(magnitude); acc.addSelf(steer); } void seperate(float magnitude){ Vec3D steer = new Vec3D(); int count = 0; for (int i = 0; i < particles.size(); i ++) { Parti other = (Parti) particles.get(i); float distance = loc.distanceTo(other.loc); if (distance > 0 && distance<40){//checking the distance Vec3D diff = loc.sub(other.loc); //sutracting the vector diff.normalizeTo(1.0/distance); steer.addSelf(diff); count++; } } if (count > 0){ steer.scaleSelf(1.0/count); } steer.scaleSelf(magnitude); acc.addSelf(steer);}

Attraction

Seperation

Alignment void align(float magnitude){ Vec3D steer = new Vec3D(); int count = 0; for (int i = 0; i < particles.size(); i ++) { Parti other = (Parti) particles.get(i); float distance = loc.distanceTo(other.loc); if (distance > 0 && distance<30){ steer.addSelf(other.speed); //adding the ‘direction’ of the neighbouring particle count++; } } if (count > 0){ steer.scaleSelf(1.0/count); } steer.scaleSelf(magnitude); acc.addSelf(steer);}}







4.0 CONCLUSION

//4.1 Concept //4.2 Techniques //4.3 Design approaches //4.4 Future work Background: http://www.imdb.com/title/tt0062622/ Scene from Stanley Kubrick's 2001: A Space Odyssey




4.1 CONCEPT

One of the major themes of 2001: Space Odyssey is our reliance on technology and the possible potential of Artificial Intelligence. Are we at the mercy of the very technology that we create? Are we constrained by the limitation of the technology in the light of architectural design?. To what extent will AI help us in the design process, or will it replace us as the decision maker? This leads me back to the purpose of this album. The purpose of this album is to introduce the culture and techniques of scripting into architecture. The 3D software we use does help us to visualize 3D form, but we as users are to some extent dictated by the limitation of the software. Imagine scripting as simple tools we have in the toolbox, with adequate knowledge, sophisticated tools can be created by those simple tools. This liberates us from the limitation of the softwares. AI enables us to generate complex solution for finding the equilibrium from multiple conditions and requirements. This bottom-up and non-linear approach allows greater complexity in design. The dynamic system also allows the solution to evolve to best adapt to the given environment. As for the future of architecture, AI can become the tool that limits the extent of 'subjective judgement' of architect in the design process, but architects are still required to make the final judgement or to provide the aim/goal for the AI in the first place. The focus of this studio is natural system. To understand how the nature works through computer science and how it can be implemented to architecture. Not the mimicry of the appearance of natural form but to understand the complex system in natural system.

ď&#x20AC;šď&#x20AC;š


4.2 TECHNIQUES

Probability

P.17-24

Force

P.25 -28

Oscillations

P.29-32

Particle Systems P.33-34




Autonomous Agents P.35-40

Cellular Automata P.41-46

Fractals

P.47-50

Genetic Algorithms P.51-56

Neural Networks P.57-62




4.3 DESIGN APPROACHES

Project 1 - Flocks

P.71 -74 Force

P.25 -28

Autonomous Agents P.35-40

Project 2 - Stigmergy

P.75-83 Force

P.25 -28

Autonomous Agents P.35-40

Project 3 - L-System

P.84-96 Force

P.25 -28

Autonomous Agents P.35-40 Fractals

P.47-50

4.4 FUTURE WORK

The scripting techniques I have gained in this studio offer me alternative design approach in future works. The techniques can be utilised to gain greater and better understandings of site conditions and as a tool to balance conflicting conditions on site and requirements in a given brief. Autonomous agents and complex system will be a valuable tool to study the pattern of group/flock behaviour, allowing a better understanding of the need of occupants. The aim of the future is to further research on complex system and build up the confidence and level of skills to implement complex system into the design process.




REFERENCES Burry, Mark (2011). Scripting cultures : architectural design and programming (Chichester, U.K. : Wiley) Flake, Gary William (1998). The Computational Beauty of Nature: Computer Explorations of Fractals, Chaos,Complex Systems, and Adaptation (Cambridge, MA: MIT Press) Hansell, Mike (2005). Animal architecture (Oxford ; New York : Oxford University Press) Hensel, Michael, Achim Menges, and Michael Weinstock (2006). Emergent Technologies and Design: Towards a Biological Paradigm for Architecture (London: Wiley-Academy) Hensel, Michael, Achim Menges, and Michael Weinstock (2010). Techniques and technologies in morphogenetic design (London: Routledge) Kodicek, Danny (2005). Mathematics and Physics for Programmers, 1st ed. edn (Hingham, Mass.: Charles River Media) Shiffman, Daniel (2008). Learning Processing: A Beginner's Guide to Programming Images, Animation, and Interaction (Amsterdam; Boston: Morgan Kaufmann; Elsevier) (available online via MU library) Shiffman, Daniel (2011). The Nature of Code (New York: Daniel Shiffman) Weinstock, Michael (2010). The architecture of emergence : the evolution of form in nature and civilisation (Chichester, U.K. : Wiley)




APPENDIX 1: SKETCHES 1 Movement 2 Random Walk1 3 Random Walk2 4 Levy Flight 5 Perlin Noise 6 Force1 7 Force2 8 Double Pendulum 9 Particle System 10 Agent1 11 Agent2 12 Agent3 13 CA 14 Fractals1 15 Fractals2 16 GA 17 NN 18 Project1A 2D 19 Project1B 3D 20 Project2 21 Project3A 22Project3B

16 19 20 21 23 25-27 28 31-32 33-34 36-37 39 39 45-46 49-50 49-50 54-56 59-62 72-74 72 77-78 87-88 89-98

APPENDIX 2: MOVIES 1 Project1A 2D 2 Project2 3 Project3B

72-74 77-78 89-98





final