Coral Simulation

I have coded up an simulation taken from the book The Algorithmic Beauty of Seaweeds, Sponges and Corals. The goal is the study of coral growth and branching patterns.

It uses a basic model that growth and branching are driven by nutrient density this is modelled as maximal at the top of the simulation area and at zero on the substrate and close to the existing coral. Each branching tip grows in the local direction to maximalize nutrient concentration if the area is homogeneous the tip splits into 2 new growing tips. After each growth cycle we recalcualte the nutrient concentration using a laplacian.

Result

I coded something up in Rust available here

I ran a simple simulation with some hardcoded parameters and got a reasonably nice growth form:

Simulation (Point 0).

Simulation (Point 1).

Simulation (Point 2).

Simulation (Point 3).

Simulation (Point 4).

Which at least bears a passing resemblance to a real growth form in Bamboo coral. Although in that example they are trending up which could be to move more towards light?

Bamboo Coral.

(From https://en.wikipedia.org/wiki/Bamboo_coral)

It is a simple model but was fun to do and helped give me some experience of rust in action as well as a nice break from thinking about work. Coming up with some ways to extends this to make some more interesting models / learn up on some other skills:

  • A better interface – Currenlty it just has hardcoded parameters either a CLI or simple GUI interface to play around with settings.
  • Simulate dynamic conditions by allowing some of the growing tips to die.
  • Currently all nodes grow at the same rate shift this to concentration based / random.
  • Make a 3D model. -Currently the laplacian is calculation is calculated a bit by hand. Find out if there is a better rust library for this / move to GPU.
  • Add a browser based version – WASM?
  • Investigate other algorithms and models from the book.