
Show HN: Cycell2d.com – A Cellular Morphogenesis Sandbox - lurquer
http://www.cycell2d.com
======
lurquer
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.

~~~
hughrlomas
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.

~~~
lurquer
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.

~~~
cromo
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](http://algorithmicbotany.org/papers/#abop)

------
muti
Very cool! It reminds me of the game of life

For anyone that would like a glimpse of what this looks like in action without
downloading anything, there are many videos on the tutorial pages [0]

In part 3, the tutorials show a simulation of growing a flatworm [1], and a
flatworm growing a second head [2]

[0]
[http://www.cycell2d.com/tutorial.html](http://www.cycell2d.com/tutorial.html)
[1] [https://youtu.be/-cK64r_FQS0](https://youtu.be/-cK64r_FQS0) [2]
[https://youtu.be/LBeMur1mJVk](https://youtu.be/LBeMur1mJVk)

------
Rexxar
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/](https://www.cell-lab.net/)

