A multi-cellular, Venus Fly Trap-like, simulated creature

Screen Shot 2013-05-02 at 5.43.49 PM-1

Venus Fly Trap-like Creature Live Demo!

Concept

I set out to create a cellular-autonomous Venus Fly Trap-like created in a 2D physics simulation. My initial sketch of a cell was the following:
Image

This cell has two pistons on each side, allowing multiple cells to be chained together like so:

Image

In order for the trap to close, the top pistons contract and the bottom pistons expand:

Image

As it turns out, theories about how Venus Fly Traps close indicate similar possibilities.

The acid growth theory states that individual cells in the outer layers of the lobes and midrib rapidly move 1H+ (hydrogen ions) into their cell walls, lowering the pH and loosening the extracellular components, which allows them to swell rapidly byosmosis, thus elongating and changing the shape of the trap lobe.

Alternatively, cells in the inner layers of the lobes and midrib may rapidly secrete other ions, allowing water to follow by osmosis, and the cells to collapse. Both of these mechanisms may play a role and have some experimental evidence to support them.[13][14]

http://en.wikipedia.org/wiki/Venus_flytrap#Mechanism_of_trapping

Finally, I wanted to simulate a trigger mechanism whereby the cell that senses a fly signals its neighbors to contract, but with a constant messaging delay between adjacent cells. The signaling in the real Venus Fly Trap occurs through ionization:

When the trigger hairs are stimulated, an action potential (mostly involving calcium ions—see calcium in biology) is generated, which propagates across the lobes and stimulates cells in the lobes and in the midrib between them.[11] It is hypothesized that there is a threshold of ion buildup for the Venus flytrap to react to stimulation.[12]

http://en.wikipedia.org/wiki/Venus_flytrap#Mechanism_of_trapping

Implementation

My implementation is a little bit different from the sketches above. Instead, Cells are simply joined to each other through an arbitrary number of Joints per Cell, with Joint ends fixed to the center of the connected Cell. I use the Box2D.js physics simulator (I’m not sure where the authoritative version is hosted, if there even is one, but its just one file and is available in github.com/gimlids/Venus. The original Box2D is a C++ library, but there are JavaScript, ActionScript, and probably Java/Processing versions available). Each Cell is a circle in Box2D and each Joint is a spring (know in Box2D as a DistanceJoint).

Image

Cellular autonomy:

Ideally I wanted to only represent Cells in my code, but I ended up having important logic in Joints as well. The behavior of the Cells and the Joints together create all of the behaviors the creature exhibits.

Cell

Image

Each cell has the following behavior. The system calls the Touched function when the fly touches a cell, which, if the cell is sensitive (a.k.a. if it is in the top row), the cell Contracts. The cell also Contracts if it receives a Contract message from an incident Bond. Contract shrinks the cell over a set amount of time, and passes the Contract message along to all incident Bonds which are not the Bond from which the Contract message was received.

Image

Bonds

Image

Likewise, each bond, if it has angle 0.0 (meaning is a horizontal bond), contracts over a set amount of time, and passes the contract message along to whichever cell it did not receive the contract message from, after waiting a set amount of time in order to simulate the messaging delay:

Image

Fly

Image

The fly is also interesting in its own right. Its motion is controlled by two smoothly but randomly varying 1D signals which control the direction and the magnitude of a force applied to the fly. Each of these signals is an arbitrary periodic walk through a 2D Simplex noise texture.

droppedImage-4

droppedImage-3 2   droppedImage-3 2

droppedImage-2

Future Work

Just for code-and-cellular-autonomy-aesthetic reasons, I would like to eliminate the Joint from this system and have only Cells, although it might actually be more physically accurate to represent Joints as well (the space between cells in a real organism is not simply a vacuum, after all).

Of course this could be done in 3D, in which case a cone-like shape could work. Simply extruding the 2D structure into 3D would not work, as the ends of  the tightened cylinder would be open. Of course something closer to an actualy Venus Fly Trap could also be modeled, which would be a bit more complicated than a radially symmetric cone.

More subtlety could be added to the fly detection mechanism, and this could be tested with false flys, like raindrops, twigs, etc., with which real Venus Fly Traps must deal.

Once again, here is a link to the live demo where you can try a couple different versions:

Screen Shot 2013-05-02 at 5.43.49 PM-1

Venus Fly Trap-like Creature Live Demo!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s