Cell Division

This model creates a grid of 4x4x4 cells. Each cell grows untill a specific volume, after which it proliferates (i.e. divides).

In [1]:
%jsroot on
In [2]:
#include "biodynamo.h"

Create a new simulation

In [3]:
Simulation simulation("cell_division");

Let's define the number of cells we wish to create along each dimension, the spacing between the cells, and each cell's diameter.

In [4]:
size_t cells_per_dim = 4;
size_t spacing = 20;
size_t diameter = 10;

To define how are cells will look like we will create a construct in the form of a C++ lambda as follows.

In [5]:
auto construct = [&](const Double3& position) {
  Cell* cell = new Cell(position);
  // Add the "grow and divide" behavior to each cell
  cell->AddBiologyModule(new GrowDivide());
  return cell;
ModelInitializer::Grid3D(cells_per_dim, spacing, construct);

Run simulation for one timestep

In [6]:

std::cout << "Simulation completed successfully!" << std::endl;
Simulation completed successfully!

Let's visualize the output!

In [7]: