I am trying to mimic the segment patterning in fruit flies through a CC3D model. Can anyone help me as to how to draw out a 3D paraboloid PIFF file with different cell types along the surface?
5 months ago by
5 months ago by
Expanding on priyomadhyapok’s answer; Sometimes the easiest way to generate a cell layout (2D or 3D) is to just do it directly in CC3D. If you can write the equations for the geometry you can have python place the individual cells exactly where you want them.
The key commands are;
Iterate over all pixels in the model (in the python steppables file);
for x in range (0,self.dim.x): # x, y and z width of the bounding box
for y in range (0,self.dim.y):
for z in range (0,self.dim.z):
Create a new cell at a particular location (in the python steppables file);
# MYCELL is the all-uppercase name of the cell type you want
# the size of cell will be SIZExSIZExSIZE
# if you want to have the new cell centered at the3 pixel you will need something like;
# [int(x-SIZE/2.:int(x+SIZE/2. -1), ...
Write a piff file (goes in the project’s XML file)
<Steppable Frequency="100" Type="PIFDumper">
<!-- Periodically stores cell layout configuration in a piff format -->
Note: the piff file (SphereOfCells.piff) is written in the CC3D directory (e.g., C:\CompuCell3D) and not in the project’s directory like it should!
I have attached a zipped CC3D project called SphereOfCells that uses CC3D/Python to create a hollow sphere of cells and saves it as a piff file.
File attached: SphereOfCells.zip (262.91 KB)
Please login to add an answer/comment or follow this question.