Smooth Surface of a Cell
I'm trying do create a 3D morphogenesis Simulation of the urothelium. I'm draw more or less spehrish cells like this:
for xr in range(xStart, xEnd): for yr in range(yStart, yEnd): for zr in range(zStart, zEnd): rd = sqrt((xr - x0) ** 2 + (yr - y0) ** 2 + (zr - z0) ** 2) if (rd <= radiusPx): steppable.cellField[xr, yr, zr] = cell
With this function I'm able to get some sperish cells, but without a smooth surface (see first picture).
Furthermore, during the growth of a cell, they have sometimes pixels outside of the cell (see second picture). I place the cells just somewhere in the lattice, in the second picture, to see more details of the growth process.
Since, I want to create sperish cells I use formulas of a sphere to calculate the TargetVolume and the TargetSurface (the TargetSurface is doubled, so that the cell will growth). I use the following lambda values: LambdaVolume = 1.0 and LambdaSurface = 2.0
Do you know any tips or tricks about how to get a smooth surface on a cell?
* In the Potts section, set the NeighborOrder to 5 to reduce pinning to the lattice.
* The rough surface of the cells is probably caused by the targetSurface being 2X bigger than it should be for the current cell target volume. Try increasing both the target surface and target volume properly for the increasing radius. (Or, if you are changing the volume, recalculate the surface every time.) Instead of setting the targetSurface much too big simply reduce the lambdaSurface significantly.
if cell.targetVolume <= cell.volume: cell.targetVolume += 1 radius = (3./4./3.14159*cell.targetVolume)**(1./3.) cell.targetSurface = 4.*3.14159*radius**2 * 1.1 # 10% extra surface
Every MCS the TargetVolume and the TargetSurface, regarding TargetVolume, are calculated, with the provided formula.
I tried to simulate with LambdaVolume=1.0 and LambdaSurface=0.2 and 0.05 (the pictures are of the second simulation with LambdaSurface=0.05).
Since there is no way to set the surface value of a cell, are there other possibilities to influence these values of a cell than to calculate the TargetSurface and set the LambdaSurface? Where could those large surface values come from?
Another thing that makes getting spherical cells tricky is that the surface on a square lattice is always greater than for a real sphere. You need to have a somewhat larger targetSurface than the simple volume vs. surface equations for a sphere.
One thing you might consider is doing a parameter scan to find the set of parameters that works best for your size cells. I would scan targetVolume, lambdaVolume, LamdaSurface, the adhesion j values and a parameter/function that converts targetVolume into a suitable targetSurface, perhaps also the Potts temperature.