9 comments

[ 4.2 ms ] story [ 35.7 ms ] thread
For some time, I have been interested in morphogenesis -- how living systems self-assemble.

I've written CYCELL2D to be a sandbox of sorts to experiment with some of my ideas on the subject. Perhaps it will be useful to others.

I'm not a professional programmer. I'm a lawyer by trade. I taught myself programming, in part, to explore certain ideas I have about development and regeneration. Why is a lawyer thinking about such things? I don't really know, but I got interested in the subject about a decade ago when my daughter was 'self-assembling' inside my wife. Lying in bed next to a pregnant woman, knowing that cell by cell, bit by bit, a human body is being formed, got me wondering how such a thing is possible.

Before you can experiment with ideas on how this all works, you first have to come up with a good model of a cell. For my current project, I settled on a Cellular Potts model.

Once I got a 'petri dish' running, I could begin crafting 'rules' to try and get my cells to assemble into various forms.

To do this, I created a fairly simple language... a set of rules the cells would follow in an iterative fashion as they collectively build something neat. The constraints that make it interesting are that (a) no cell has any idea where it is in the system, (b) a cell can only communicate with an immediate neighbor, and (c) a cell has no memory per se.

An aspect of CYCELL that some might find intriguing is a version of 'morphogenic fields' that I've incorporated into the program. It's explained at the site. I would love any feedback, both on the program itself and -- more generally -- the 'Fields' concept that is the backbone for the cooler sample videos that may be found in the Tutorial section.

Everything is C++. Used SFML for graphics and TGUI for the user interface.

I'd be happy to share my source code, but I'm not all that familiar with GitHub yet. If anyone wants it, let me know and I'll simply put a link on the site.

I know I would be interested in it. I love things like this. A program borne of curiosity and exploration speaks to the inherent beauty of programming, being able to have an idea and bring it to life in code.

Given that you've created this, hosting it on github would be trivial for you.

Thanks for your interest. I'll stick a link to the source code files within a day or so... It's not pretty; especially the parser.
I'll also encourage you to post a link to the source, even if it's not the cleanest code. I've been thinking about trying to make something like this for a while, but using larger-scale cells from a side-on view to simulate plant growth. (To that end, I'm currently reading The Algorithmic Beauty of Plants[1], which performs its generation via L-systems.) I'd love to see how you've put this system together.

[1] http://algorithmicbotany.org/papers/#abop

This looks really good in the video Ive seen. I like the organic look of the cells and how they stick to each other.

Time for a download.

I haven't had a chance to dig in too much, just watched most of the videos on the tutorial page so far. But this looks awesome—great work.

Out of curiosity, what are your goals with the project? Is it just for fun and personal research, or do you have anything in mind to do with it beyond that?

I'm surprised it wasn't featured more prominently on the front page and discussed more—but this site is weird that way sometimes...

My goal with it was to test a theory -- an algorithm really.

It can be found on the site at the 'Fields' page.

It extends beyond cells.

Take a marching band, for instance... You have 500 marchers, all blindfolded, and the goal is to get them to spill out onto the football field and form an intricate design. The constraint is that you have to give each marcher the SAME rules... that is, each marcher starts out identically to every other marcher.

Well, the 'Field' algorithm is one way of accomplishing this.

I made the program to see if the algorithm really worked. Like most things, it seems obvious in retrospect. But, before the program was done, it was difficult for me to really convince myself that the idea had merit.

This is remembering me a small android game I played a lot 1 or 2 years ago where you can simulates cells in a Petri dish: https://www.cell-lab.net/