Proposal for Independent Study with Prof. Casey Reas
project by Michael Chang UCLA D|MA 2005

 

Winter 2005 Syllabus
My focus for this independent study will be to improve my expression of art, design, and research through a code. By the end of this project I want to be better at expressing complex concepts effectively through code and interactive/generative media.

The analogy that I'm expressing is "cellular morphogenesis", the act of thousands of building blocks forming complex, higher level forms that have function and behavior. I will demonstrate this by writing a simulation program that achieves the following goals:

1. clearly expresses the idea of this "cellular morphogenesis" to human beings
2. have a strong sense of asthetics, being beautiful to look at
3. backed by research to properly demonstrate what it's actually doing

Background on "Cellular Morphogenesis"
The idea came to me reading while The Emergence of Everything by Harold J. Morowitz on a chapter about the emergence of multicellularity and its implications. The interest for me here is the emergence of this phenomenon, that individual and autonomous cells could group together to cooperate and even specialize, eventually forming functional living animals. Specifically, the move up from a lower level of complexity (cell structure, organelles, cell walls, etc) to a higher level of complexity (cells specializing into skin cells, nerve cells, bone, tissue, etc) is what excites me to no end. I want to be able to not only express this idea in a programmed and algorithmic environment on the computer, but also have people understand and learn about this concept, and at the same creating a beautiful piece of generative art.

The "End Product"
By the end of this independent study I want to have a fully functional simulation program written in either Processing or C++/OpenGL, installed in a gallery running on projection with prints and info-graphics introducing my concept to the viewer.

---Timeline--------------------------------------------------------------------------------
Week 2 - set proposal, research, write-up, sketches
Week 3 - research + begin design + additional sketches
Week 4 - design and programming
Week 5 - continue design + programming.
Week 6 - design + review
Week 7 - design + second review
Week 8 - finalizing, bug cleanup
Week 9 - presentation

 

-------------------------------------------Week 3-------------------------------------------

Week 3 begins with research and design phase.

Emergence from Wikipedia (my notes/highlights in color)

Emergence is the process of deriving some new and coherent structures, patterns and properties in a complex system. Emergent phenomena occur due to the pattern of interactions between the elements of a system over time. Emergent phenomena are often unexpected, nontrivial results of relatively simple interactions of relatively simple components. What distinguishes a complex system from a merely complicated one is that in a complex system, some behaviours and patterns emerge as a result of the patterns of relationship between the elements.

An emergent behaviour or emergent property is shown when a number of simple entities (agents) operate in an environment, forming more complex behaviours as a collective. A system made of several things can host properties which the things themselves do not have. For instance, consider two points on a plane. These points will have a distance between them. This distance is not itself a property, but exists in the relation between the points. Emergent properties can arise not only between things in the system, but between other emergent properties. The number and subtlety of these properties can be very much greater than the number of things.

Emergent properties arise when a complex system reaches a combined threshold of diversity, organisation, and connectivity. The property itself is often unpredictable and unprecedented, and represents a new level of the system's evolution. The complex behaviour or properties are not a property of any single such entity, nor can they easily be predicted or deduced from behaviour in the lower-level entities. The shape and behaviour of a flock of birds or school of fish are readily understandable examples, and it is typical that the mechanisms governing the flock or school are harder to grasp than the behaviour of individual birds or fish.

This helps to explain why, for instance, the number of ways of packing boxes into a truck increases exponentially with the number of boxes and why the fallacy of division is a fallacy. According to an emergent perspective, intelligence emerges from the connections between neurons, and from this perspective it is not necessary to propose a "soul" to account for the fact that brains can be intelligent, even though the individual neurons of which they are made are not.

Emergent behavior is also important in games and game design. For example, the game of poker, especially in no limit forms without a rigid betting structure, is largely driven by emergent behavior. For example, no rule requires that any player should fold, but usually many players do. Because the game is driven by emergent behavior, play at one poker table might be radically different from that at another, while the rules of the game are exactly the same. Variations of games that develop are examples of emergent metaplay, the predominant catalyst of the evolution of new games.

Emergent structures are patterns not created by a single event or rule. There is nothing that commands the system to form a pattern, but instead the interactions of each part to its immediate surroundings causes a complex process which leads to order. One might conclude that emergent structures are more than the sum of their parts because the emergent order will not arise if the various parts are simply coexisting; the interaction of these parts is central.

A biological example is an ant colony. The queen does not give direct orders and does not tell the ants what to do. Instead, each ant reacts to stimuli in the form of chemical scent from larvae, other ants, intruders, food and build up of waste, and leaves behind a chemical trail, which, in turn, provides a stimulus to other ants. Here each ant is an autonomous unit that reacts depending only on its local environment and the genetically encoded rules for its variety of ant. Despite the lack of centralized decision making, ant colonies exhibit complex behavior and have even been able to demonstrate the ability to solve geometric problems. For example, the ant colonies routinely find the maximum distance from all colony entrances to dispose of dead bodies.

Emergent structures also include cities and many natural phenomena including the shape of galaxies. Because they form order despite the lack of command, emergent structures may appear to defy entropic principles.

Emergent processes or behaviours can be seen in many places, from any multicellular biological organism to traffic patterns or organizational phenomena to computer simulations and cellular automata. The stock market is an example of emergence on a grand scale. As a whole it precisely regulates the relative prices of companies across the world, yet it has no leader; there is no one entity which controls the workings of the entire market. Each agent, or investor, has knowledge of only a limited number of companies within their portfolio, and must follow the regulatory rules of the market. Through the interactions of individual investors the complexity of the stock market as a whole emerges.

Emergent structures appear at many different levels of organisation. As mentioned earlier, the spatial structure of galaxies is an emergent property of the distribution of energy and matter in the universe. Similarly weather phenomena such as hurricanes are emergent properties as is life itself. Consciousness is an emergent property of a network of living cells. Emergent self-organisation appears frequently in cities where no planning or zoning entity predetermined the layout of the city.

 

Summary from this Wikipedia article
Important things to show about emergence: agents operating in an environment and forming complex behavior or structures, of which could accomplish what the agents themselves could not have before. It is important to show how this system could create new and unexpected results, not predicted by the lower-order forms (the agents themselves). Another important thing is to have these agents "form order despite the lack of command".

Some questions and concerns:
I don't want the constituent parts (agents, individual cells) to become simply "movable, adjustable parts" in a creature. But then again, showing cells on their own would not make much sense, since the focus is on multicellularity and the forms that evolve from the concept. If I'm doing evolving virtual creatures, evolving virtual airplanes, evolving virtual whatever, these cells act basically like "building blocks". How abstract should the cells be? Should they look and behave like cells? Should they be abstract "parts" to a creature? This question may actually be a purely cosmetic one, however.

Should the software focus on the cells forming to become a higher level creature?
Or should it focus on the forms that the cells make, assuming they already have?
I think from an aesthetic point of view (this is a media art piece, after all) showing forms, patterns, and structures emerge from multiple cells that look like they are independent (or, could be if seperated from the mass) is more interesting. The focus should be on the forms created with these cells, as opposed to the actual process in which cells come together and form higher complexity.

 

Morphogenesis and Developmental Biology from Wikipedia

Some important excerpts from Developmental Biology:

Developmental biology studies the genetic control of cell growth, differentiation and "morphogenesis," which is the process that gives rise to tissues, organs and anatomy. Embryology is sometimes reserved to refer more specifically to the study of organisms between the one-cell stage (generally, the zygote) and the beginning of free living.

I will not be focusing on embryonic development though, and possibly assume my creatures give offspring in rather simple ways, however the growth of cells within a creature might be very important...

 

Quotes from The Emergence of Everything on Multicellularity

"Among single celled organisms, it often happens that cells divide and do not split apart, but show a stickiness that leads to colonies. When this is followed by variable differentiation of the cells of a cluster into different forms, we refer to the phenomenon as morphogenesis"

I am going to focus on the animal taxa as opposed to flora or mushrooms/fungus. Animals have animation, and forms that can perform animation are of interest to me.

 

Some notes and concerns

How many cells should my creatures be composed of? This falls under a computer science question because in the end I will have to optimize it in order to perform in real time. Or should it be in real time at all? Perhaps it should be rendered out, like Karl Sims Evolving Virtual Creatures since my creation is non-interactive.

Early estimates:

  Real Time Rendered

Multiple Creatures Environment

25-80 cells 150-250 cells
Single Creature Environment 150-400 cells 350-1000 cells


This also depends on how complex the interactions are between each cell, how it's organized and written, and what the visual display is. These estimates are far too early at the moment.

 

Priority Design Questions (these need to be answered!)

1. What determines success of a creature? Meaning, what quality are the creatures being selected for? Survival? Competition for speed? Competition to accomplish a task? (this assumes creatures automatically evolve motility).

Any competition involving animation is interesting. Swimming will be first, then to various tasks like attacking other creatures!

2. What are the ways in which breeding and offspring of successful designs processed? Random mutations? Mix gene pools?

Mixing gene pools of successors seems to be ideal, though how it's done remains to be seen.

3. What do individual cells do, on their own? What's the level of interactivity between cells, and should this be represented? If so, how?

Little. The cells interact with each other through connections, but as an individual they will only react to physics (forces, friction, kinetic energy, etc).

4. What will the environment be? Will there be immediate competition against other creatures in a live environment? Will there be physical terrain to traverse? How important is this to the study of emergence and evolution?

No initial environment, especially selecting for creatures with the fastest motion through a fluid.

5. How abstract or literal should cells and creatures be?

Abstract at the cell level, but closer to literal at a creature level, hopefully.

 

Visual Design

Below are some images I found for what I want my piece to look like. Notes are underneath each.

 


This color, depth, and the sense of a microscopic world might be an
interesting asthetic to take into this software.

 


I'm not sure how literally to take the cells analogy just yet, especially
with visual appearance. Although I do like the clear dilineation
between background and foreground forms while still having a clear
sense of texture and ambiguous form.

 



The more I look at these the more I think "this is what's expected"
and the more I feel like staying away from a purely microscope
visual asthetic.

 


In thinking about colors, how far do I want colors to be
representational versus purely asthetics? Do I want a HUD?
Do I want lame programmer colors? Do I want a visual display
that reads more clearly for showing cell division, cell
specialization, as opposed to just making it look beautiful?



How literal should the visual appearance of creatures
and cells be? Should they be abstract computer CG cells?

 


Moving away from microscopic asthetic on the opposite extreme,
creatures and their constituents can be completely abstract.

 

 

 

Here is a visual map of the search space of asthetics I can take with this project.

Aesthetic, being what it is, beautiful and good to look at. At its purest level, one cannot tell what this project is about. It would be abstract or even painterly.

Literal is to take this project in a very literal-construal way, depicting cells as they are under a real microscope, flagella et al. Since this is not a scientific research project, a full swing in this direction is probably not a good idea.

Computational is more abstract, and at its purest level everything would just be numbers or programmer colors, lines, and symbols representing what's going on.

As this project progresses I'll discover more about where I want to be on this map. Right now I'm aiming at the red dot, something more artistic and abstract than literal, yet borrowing from the visual language of cells under microscopes, but at the same time provide visual clues with a toggle-able HUD.

Probably during development, graphics will be kept simple and as computational as possible. On the side, a visual identity will be developed, especially towards the end.

 

 

 

-------------------------------------------Week 4-------------------------------------------

So this week's meeting got nyxed because I didn't have much to show for wednesday. Nonetheless, I continued working after I got back at full pace. Here are some progress.

Springs
Before getting started I realized that springs would be an important technical element to make things look and feel realistic. Chaim Gingold from MAXIS once sent me example code showing how he implemented his springs. His code worked with scalar values, and I needed mine to work with my own vector classes, so I wrote my own spring/force function based on his code.

My code looks like this:

vector getSpringForce(position from,position to,float desiredLength,float constant)
{
vector force=new vector(from,to);

if(dist(from,to)!=0)
{
vector deltaLength=new vector(force);
position targetPos=new position(to.displace(getHeading(to,from),desiredLength));
deltaLength=new vector(from,targetPos);
force=new vector(deltaLength);
force.m*=constant;
}
return force;
}

The function returns a force vector to move an object a certain distance away from another object.

 

View Applet. The mouse moves the orange circle, while the blue circle
acts like the recieving end of a spring. The red dot indicates the desired
distance away from the orange circle.

 

Lattice
To test this new springs code, I wrote a quick "lattice" class, basically a collection of points with applied springs against each other. The result was surprising and fun to look at, and the motion was unexpected...

View Applet.

Two nodes will follow the mouse. Even though they were coded to "stick" to the mouse, they behaved as if they were magnets in a larger collection of other magnets drawing them away from the mouse. The motion of these nodes trying to organize themselves into a relaxed state was fun to watch, especially when the two penetrate the patten formed by the others. Reducing the number of node immediately makes resolving the tension a lot faster, however it just becomes a polyhedron.

 

Structure
The next step is to create some form of structured network between these nodes, and actually make these nodes "cells". I'm not quite sure yet how structures should be formed. I'm quite certain that there should be at least three different types of connections between cells, but I'll write about this later.

This sketch is to illustrate a formation of networked cells to form structure, rather than cohesion (which will be dealt with later). From my reading, one of the most important things about demonstrating emergence is the agents' capacity to interact with each other, forming connections that would allow emergent properties to form. Because everything's created procedurally, I could collect the data required to generate these forms (multiple data structures right now) and regenerate them, modify them, etc.

The data structure used to make these right now is inefficient, but it does the job. Every "cell" has a list of connections, numbered 1 through N (the amount of cells). These connections will be the only "significant" connection, beyond making cells cohesive and collide against all other cells. I've taken the liberty to make these designs bi-lateral... more on this later.

View Applet. Click the applet to make a new formation.

 

Some Notes for Today
I think there should be multiple types of connections that cells can make with each other, while each cell would remain identical by type. These connection types are ofcourse artificial, but they intend to represent deeper levels of chemistry and physics at atomic levels that I don't care to simulate. We're going to assume these three connections for now (based on organic analogies):

Bone - cells connected to other cells via this connection will have strong tension threshold for their springs. I'm not sure if I'm going to allow these cells to be too far apart. I want to allow for a chain link of bone cell connections that form large-scale physical constructs.

Nerve - cells connected to other cells via this connection can transmit signals, much like a tiny neural network. I'm hoping that looped neural networks might form for some interesting interactive behavior. I'm not sure how they should work yet, though.

Muscle - cells connected to other cells via this connection can take recieved signals and contract their springs, releasing after some delay. Like a bone connection, I'm not certain whether I should allow this at longer distances.

Finally, should a cell have multiple types of connections to other cells? Can a muscle cell also be a nerve cell?

 

 

 

-------------------------------------------Week 5-------------------------------------------

Lattice 2 (view applet)
I allowed adding nodes by clicking on the app to investigate why the nodes destabilize and begin to undulate into itself. I'm guessing it's a bug with my springs, or how I implemented them.

 

Gemone
After rereading Karl Sim's paper on Evolving Virtual Creatures, I realized that the best way for me to procedurally create colonies of cells would still have to be a directed graph. I'm currently modeling his approach by generating genomes (a blueprint of instructions) and phenomes (recursively reading bits of this blueprint). This sketch only shows the direction of the next cell growth, and do not reflect the end-shape of the creature. Currently there's a bug preventing the root node from ever generating additional "giant branches". It's possible that my implementation might be flawed, too.

At any rate, this approach generates highly complex forms with relatively little data, and contains the possibility of recycling useful data, such as instructions on how to build an arm. The sketch demonstrates that patterns emerge and re-emerge by recycling data. This is a big improvement over the "structure" sketch.

The next step is to apply springs to these.

 

View Applet. Click the applet to make a new formation.