MA Research Papers

My MA Research papers at Goldsmiths:

 

Swarm Art Computing: A definition and future Directions

Swarm Art Computing FINAL Pdf (3)

 

 

The Application of Morphogenesis in Design: From Bubbles to Marxian Theory

http://doc.gold.ac.uk/compartsblog/index.php/work/the-application-of-morphogenesis-in-design-from-bubbles-to-marxian-theory/

 

Posted in ma

02 MA Genetic Algorithms Research

The research was based on the study of Shiffman’s Genetic algorithm explanations as the groundwork for the field of study. This was also the basis of our MA openframeworks journey and code using Genetic algorithms.

Overview

The basis of genetic algorithms is the solving of quite difficult problems which if done sequentially will be very hard to complete in a short space of time. (Example: How to obtain a sentence that is calculated using genetic code.)

Population  We need a population of something defined (examples; sentances ;graphical objects) that we can use our DNA on and to somehow change the physical aspects of the objects in some way. 

The population creation should also create its own DNA. Whenever a class object is created.

Perhaps the attraction force to a mouse or blobs increases when the objects are selected. Also, the attraction force is hereditary.

 

We define a phenotype and genotype

genotype. The DNA. What is the DNA? Normally a code, or number stored in a array list. No limit on number of DNA codes. The key to the DNA is the phenotype. How we choose to physically express the DNA. We can either express the DNA as a actual defined object ( e.g. types of animals ) or we can be quite obtuse and define the DNA as a floating decimal between 0-1.

phenotype: How do we use the DNA? In this case we use a population of spheres with a simple physics engine using perlin noise as the force vector driving the acceleration. What does the the DNA do? We can access only one agent of the DNA. What do we do with it? We use it to drive both the size and speed of the spheres. The direction is using the perlin noise. The DNA give us the values between 0-1 and then we map them to a phenotype ( a physical property).

 

The fitness algorithm. 

This is probably the most important feature of genetic algorithms, It decides on whether an existing member of the population exists or not. How do we decide that? We can either use a simple algorithm to make the case for a member of the population to survive or we can use the input from an outside force the user! The third option is fascinating. Decide on whether a element of the population survives by using a random means. In this case we create x,y point of “food: whereby if the element of the population comes near them then they can be fed and stay alive ( be healthy ). Also if they stay alive for long enough they can create new offspring. They survive and breed.

Why use them ?  – We can obtain difficult solutions very fast. The classical way of using them is to run a series of sequences (either using time as a factor of finishing an event or having a lifespan determining a measured event). However, the clever way to use them is to have “health” factor determine there existence then have this heath factor augmented by a user event, an interactive event. Or do both!

 

Shiffman’s solution for Genetic Algorithms

 

The initial equation by shiffman just uses spheres: Each sphere receives its DNA that defines is speed and size and its color is defined by its “health”. The spheres are dying since there birth. There health is defined by a clock that ticks downwards. If they manage to find food (the grey rectangles) they increase there health. If they live for long enough they have a higher chance of reproduction.

 

 

 

 

Development of the ecology experiment

From the initial setup of the ecology programme the first thing I did was to expand the DNA values to accept over 20 values and start populating them with different variables as a test:

// ACCESS DNA 0 SPEED
// ACCESS DNA 0 RADIUS
// ACCESS DNA 1,2,3 RGB
// ACCESS DNA 4 NO. OF POLYGONS
// ACCESS DNA 5 TYPE OF DISPLAY

The DNA values could also include elements to address the sound associated with each class of display elements. Something to investigate later.

The first two tests showed the DNA controlling the colour,  the  no. of polygons and the type of element displayed.

 

 

The second one shows the food following the mouse position

 

User Interaction

The next step was to add the health if they come into contact with the mouse or attraction force target.

 

 

Add-on DNA attraction force

Add the ability for the elements to be attracted to the mouse if they are selected by the user (or come within a certain distance of the mouse.).

 

 

 

 

 

SaveSave

SaveSave

SaveSave

Posted in ma

00 MA Final Show Design

Installation Idea

 

 Creating an immersive soup of digital and physical interactive objects all within the theme of Morphogenesis.  

 

 

 

The setup

 

 

The installation is a imaginative educational ecology of biological simulated processes. 

These take the form of actual biological processes (bubble making and detection). Physical representations of processes (lights which communicate with each other either with genetic or cellular coding) that have been made using voronoi and reaction diffusion output patterns. Digital projections of imaginative L-system trees and floor interactive swarms projections.

The floor system will have generative sounds made possible by user interaction. If bubbles can be detected they will also generate both sound and floor swarm projections. The lights will also generate different sounds and lighting sequences and will talk to each other. The L-systems will also generate sounds when there “leaves’’ fall to the ground.

As well as the ecology. There will be either a educational video or interactive display and animation explaining to the viewer all of the processes in action and why they are used.

Morphogenetic algorithms in use include:
(All of my algorithms)

  • 1  Voronoi patterns
  • 2. Reaction Diffusion algorithms and patterns
  • 3. Swarming algorithms
  • 4. Genetic algorithms
  • 5. L-systems algorithms
  • 6. Cellular automata algorithms
  • 7. A blob detection system with built-in gestures. Which feeds into the ecology.

Actual physical processes:

  • 8. giant bubble creation and detection.

 

 

The application of the Morphogenetic algorithms:

  1. Voronoi patterns (used to make the clay lights that communicate with each other)
  2. Reaction Diffusion algorithms and patterns (used to make the clay lights that communicate with each other)
  3. Swarming algorithms (generated by the bubbles and by user the user interaction)
  4. Genetic algorithms ( used for a basic ecology of organism on the floor projections)
  5. L-systems algorithms (side projection of l-system trees with seeds that drop to floor of blown the wind)
  6. Cellular automata algorithms (possible light communication )
  7. A blob detection system with built-in gestures. Which feeds into the ecology. (swarms which either are created by the blobs and or feed genetically  into the floor projections and are controlled by the user interacting with them)
  8. Giant bubble creation and detection. (Detected and transferred into sound and digital swarms representations onto the floor.)
Posted in ma

05 L-systems

L-systems have a natural growing rule set which simulates the growth of plants and trees.

The original problem that Fibonacci investigated (in the year 1202) was about how fast rabbits could breed in ideal circumstances.

Fluffy bunnies

Suppose a newly-born pair of rabbits, one male, one female, are put in a field. Rabbits are able to mate at the age of one month so that at the end of its second month a female can produce another pair of rabbits. Suppose that our rabbits never die and that the female always produces one new pair (one male, one female) every month from the second month on. The puzzle that Fibonacci posed was…

How many pairs will there be in one year?

.The simple rule below uses the idea of 2 adults (A) make a offspring pair (O) which after one generation become adults themselves which can also reproduce. this system repeats continuously.

The recursive nature of the L-system rules leads to self-similarity and thereby, fractal-like forms and are easy to describe with an L-system. Plant models and natural-looking organic forms are easy to define, by increasing the recursion level the form slowly ‘grows’ and becomes more complex. Lindenmayer systems are also popular in the generation of artificial life.

The simplest L-system to make is simply a growth pattern with 2 branches at the end of every branch. 

However, more complex systems use Turtles. Turtles are the interpretation of simple rules of growth. Something can grow in branches using [ ] (whatever is inside brackets). Growth be symbolised by letters ( F and G) WITH RULE SETS AND AXIOMS.

 

 

  • variables : 0, 1
  • constants: [, ]
  • axiom  : F
  • rules  : (G → GG), (F → G[F]F)
  • G draw a line segment ending in a leaf
  • F: draw a line segment
  • [: push position and angle, turn left 45 degrees
  • ]: pop position and angle, turn right 45 degrees

 

A Decaying Forest tree system

Using the above concepts and the example from Shiffman of growing tree. The code was developed to create random decaying trees over time.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Turtle

+ TURN RIGHT BY ANGLE

– TURN LEFT BY ANGLE

& PITCH DOWN BY ANGLE

^PITCH UP BY ANGLE

\ ROLL LEFT BY ANGLE

/ ROLL RIGHT BY ANGLE

| TURN AROUND BY 180 DEGREES

F move FORWARD by 1 unit

[] new BRANCH (whatever is inside brackets)

T move TROPISM BY 1 UNIT

Cloners!

group 1 = I

group 2 =J

group 3 =K

group 4 = L

The parameters in the Turtle and Values tabs are meant for advanced users with programming experience (these tabs contain an entire L-System). Those of you with little or no programming experience should, however, not be scared off. In the following are several variable examples.

Make sure you first set Mode to Turtle.

Brief introduction to L-Systems

In the following pages, the L(indenmayer)-Systems are briefly explained. Additional books or online resources are available that offer an in-depth explanation of these systems (the pdf document “The Algorithmic Beauty of Plants” from Przemyslaw Prusinkiewicz and Astrid Lindenmayer is based on use with CINEMA 4D and can be downloaded at http://algorithmicbotany.org/papers#abop).

L-Systems are usually used for similating plant growth and similar effects. Combined with MoGraph, these can be used to create spectacular growth simulations by placing a MoSpline object into a Sweep NURBS object, thus creating a renderable object (Splines can be rendered directly using Sketch and Toon or HAIR).

Simply put, an L-System executes a series of commands that define how and where new branches should grow. It is a self-producing system that can replace existing branches with new ones.

The basic principles are fairly simple and are based on a system called “Turtle System”. A (virtual) turtle is sent on its way via simple commands. This path is represented by a Spline.

The 3 most important commands are:

  • A simple F, which simply means “Go one step Forwards”. For a MoSpline it means “Extend the Spline by one unit (in the object’s Z direction)”
  • +: Rotate right
  • : Rotate left

If you enter the sequence F++F++F in the Premise field it translates to: “Take one step Forward; turn twice to the right; take another step Forward; turn twice to the right; take another step Forward.”

How big each step is and how large the angle of rotation is can be defined in the Values tab via the Default Movement and Default Angle values, respectively. Or, as described below, by placing them in parenthesis. If Default Angle is set to 60° a perfect triangle will result for our example:

lupe.gif

029766.jpg Two different command codes: left F++F++F; right: F-F++F-F (each with a Default Angle of 60°.

 

This lets you create branch-like shapes. A very interesting function of L-Systems is its integrated replacement system with which individual branches can be replaced by others. This can also be done recursively, which lets you create very complex branching with simple command codes. If this sounds confusing, the following example can shed some more light on what’s involved:

So far you have only entered single-line command codes that were executed only once. Now enter the following command code into the respective fields:

Premise field: F++F++F

Rules field: F = F-F++F-F

As you can see, the Rules code line contains an assignment (in the following refered to as Rule) in which “F” is assigned several symbols that in turn will (internally) be inserted into the Premise line of code.

If written out in its entirety, the command line code would read as follows (replace the F in the Premise line of code with the code following the “F” in the Rules line of code):

F-F++F-F++F-F++F-F++F-F++F-F

This represents the second shape from left in the image below. Since each F in the Premise code is replaced by the Rule, each straight line will be replaced by the more complex line.

lupe.gif

029767.jpg Change of shape when each F is replaced by the “F-F++F-F” code.

 

And this replacement process can be repeated indefinitely (well, not quite, since your computer will probably throw in the towel after the exponentially increasing complexity of the Splines starts to grow…). How often this replacement process is repeated is defined by the Growth value, which replaces each F with the Rules code. Incidentally, fractals work the same way.

Of course placeholders can be used as well so that not necessarily each F has to be used. After all, this would be unrealistic for growing formations – growth in length does not always occur only at the end of branches, etc.

For this you can use placeholders (letters that do not represent any Turtle command) such as A, B, C, D, (but NOT “F” because it is the default “one unit forward command”).

Type the following into the respective fields:

Premise: FA

Rules: A=+F-FA

lupe.gif

029768.jpg

 

Since the Rule ends with an A, an increasing Growth value will result in the formation growing endlessly (Default Angle is set to 90°).

Tip:

This simple-looking replacement rules can create an amazingly complex geometry over several generations (see below). If symbols are used incorrectly you can end up crashing your computer. So be careful when experimenting and save your work often (even in a simple text editor). It is also very helpful if you set Display Mode to Line.

The code we have used so far has consisted of a single, uninterrupted line of code. However, L-Systems first become interesting when real branches are created, i.e. new lines that branch from existing lines. And this can be achieved by using square brackes ([ ]). The command sequence within a square bracket is viewed as a separate branch (and creates a new Turtle). After the branch has been created the turtle will return to the starting point prior to the square brackets and continue with the command sequence following the square brackets.

Type the following into the Premise field:

F[+F][-F[-F]F]F[+F][-F]

lupe.gif

029769.jpg This is the result of the command code above with a Default Angle of 30°.

 

If you now enter F into the Premise field and the above code (F=F[+F][-F[-F]F]F[+F][-F] ) into the Rules field, each F will be replaced by the braches at the left of the image. Increasing the Growth value will let the branch continue to grow because each straight line will be perpetually replaced by a new branch. If you look closely you will see the branch pattern at the left repeated in the tree at the right (highlighted in green).

This is an easy method of creating complex plant-like branching:

lupe.gif

029770.jpg Various command codes. Note that any letter (in this example “A”) can be used as a placeholder. At the bottom right of the image a Default Angle value of 90° was used.

 

Until now we have generated everything on a flat plane. Since branching doesn’t only take place on a single plane but in every direction, command symbols exist that also makes this possible.

These are (a degree value can be added in brackets after the command symbols):

& or ^: rotate around the Turtle’s transverse axis

\ or / : rotate around the Turtle’s longitudal axis

Type the following into the Premise field: F&F\ (90)^F+F:

lupe.gif

029771.jpg The 90° after the “/” are not really necessary because the Default Angle value will be applied for small specifications.

 

The result is the Spline pictured above. The turtle moves forward (F), rotates at a right-angle around its transverse axis (&, Default Angle is set to 90°), moves forward again (F), rotates 90° around its longitudal axis (\ (90)), then 90° around its transverse axis (^), moves forward again (F), turns right (+) and finally moves forward again (F).

If you use this method to create branched spatial formations, real bushes and trees can be created.

User Data

029772.jpg

You can use the User Data as variables in a sequence of symbols. In the image above an Angle parameter was added to the User Data that was then substituted in parenthesis for ^ (turtle rotates around transverse axis) in the Premise field.

Special characters and spaces should not be included in the variable names. Underscores are recognized (e.g. “second_length”) as is capitalization.

Formulas

Formulas, including defined variables (e.g. F(_growth*2), can be used instead of normal digits. The following are available:

029777.jpg

Example “Total/Index”

Let’s say you have the string F(_index)F(_index), which consists of two commands. The string performs the same function as F(1)F(2) (one unit forwards then two units forward). For example, since “_total” is the total number of commands, a spiral can be created with the following command:

Premise: FA

Rule: A=+(20*_index/_total)FA

Example “_level”

Let’s say you have the following command:

Premise: A

Rule: A=FA

The following level values will result (shown here in parentheses for demonstration purposes – these will NOT actually be shown):

Growth = 0 : A(0)

Growth = 1 : F(1)A(1)

Growth = 2 : F(1)F(2)A(2)

Growth = 3 : F(1)F(2)F(3)A(3)

Now that you know how the “_index” numbering is done, take a look at the following command:

Premise: FA

Rule: A=+F(_level*10)A

…creates the following spiral with Default Angle set to 90°:

029773.jpg

Example “_arg”

Just as you can define F(a,b,c)=F(a*2,b*2,c*2) to set parameters for Turtle commands (in this example F) you can also use the “_arg” command. These don’t have to be evaluated at the beginning. F=F (_arg1*2,_arg2*2,_arg3*2) does the same as the command above.

Advanced syntax variations

The following syntax is also possible:

Premise: F(2)F(1,2)F(2,3)

Rule : F(a,b) = F(a*2,b*2)

All Fs will be replaced and wherever “a” or “b” appear within the Rule existing F arguments will be handled as follows:

F(2*2,1*2)F(1*2,2*2)F(2*2,3*2) which logically equates to F(4,2)F(2,4)F(4,6).

Rule constructs like the following are also possible:

F(a,b):(a>10)=F(a,b)+F(a/2)

This Rule will, for example. only be applied if the value of the first argument is greater than 10.

In the following example both syntax variations above were combined and produce an interesting effect:

Example “fruits”

lupe.gif

029774.jpg

 

In the example above, several branches grow simultaneously. When one branch has finished growing a sphere will be placed at the end of the branch (requires the command J, see example: Klon-Objekt).

Note that “B(6)” is defined in the first Rule and that “B(h-1)” reduces the argument by 1 in Rule 2 until “h=0” finally sets the sphere in Rule 3.

Take a look at the console to see the entire string (but first click on the Result String to Console button).

Further details regarding formulas can be found in the attachment.

Premise

Enter the premise here. This is most often a single-letter command (see Rules) or a placeholder to which content is added in the Rule field. In the following pages you will find numerous examples of how strings can look.

Context Ignore

Here you can define a series of symbols (commands) that will be ignored by context rules. Example:

You have the following constellation:

Premise: A+B+C+D+E+F

Rules: A

Rules

030012.jpg

Example “creating polygons”

lupe.gif

030017.jpg

 

Take a look at the second line of the Rule field:

L=[{.-f.+f.+f.++++f.+f.+f.+f}]

Between the curly bracktes (these define a polygon), a specific number of polygon points is defined (each begins with a “.”) between which a polygon is created. Because the curly brackets are contained within square brackets, the turtle will be reset to its point prior to creating the leaf after each leaf has been created.

The entire leaf will be assigned to an “L” and the Rule in the line above will create a complete leaf wherever an “L” exists.

Note that the MoSpline can produce either a Spline OR a polygon. If you want to produce both simultaneously, use the Destination Spline.

Example “multiply/divide”

lupe.gif

030018.jpg

 

If you use a self-replacing sequence of symbols in the Rules field (e.g. A=F+BA), a multiplier or divisor (, !, ;, _, ?, @) can be used to increase or decrease the value of each new Generator.

Example “cutting a branch”

lupe.gif