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!


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:

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


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


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]


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]



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).


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.



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.




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:




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-3 2   droppedImage-3 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!


Aquarium Offline Mode

  1. Share
    Abos Aquarium Blob Detection not Tuned for Offline Mode
  2. * This video shows the short burst of offline mode we did achieve; it appears that the optical flow / blob detection is tuned for realtime mode

    * There seem to be bugs in the garbage collection inside ABOS that are keeping us from being able to implement offline mode in ABOS in a reasonable amount of time

Hello world!

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.