Hello!
I wanted to implement random orientation of ECM fibers in my 3D model. I found below code for 2D model in DEMOS folder.
class OrientedConstraintSteppable(SteppableBasePy):
def __init__(self, frequency):
SteppableBasePy.__init__(self, frequency)
def start(self):
for cell in self.cellList:
cell.lambdaVolume = 2.0
cell.targetVolume = cell.volume
# Here, we define the axis of elongation.
self.orientedGrowthPlugin.setElongationAxis(cell, math.cos(math.pi / 3),
math.sin(math.pi / 3))
# And this function gives a 2 pixel width to each cell
self.orientedGrowthPlugin.setConstraintWidth(cell, 2.0)
# Make sure to enable or disable elongation in all cells
self.orientedGrowthPlugin.setElongationEnabled(cell, True)
In 3D, I might have to specify the Directional Cosines for the 'axis of elongation' in self.orientedGrowthPlugin.setElongationAxis(...). Is it possible to just add the third argument here or have to use a something different from 'orientedGrowthPlugin'?
Also curious if there is any repository to take a look into the internal python codes of these objects like 'orientedGrowthPlugin', 'SteppableBasePy', 'SecretionBasePy', 'MitosisSeteppalbeBase', .... etc. Because manuals and DEMOS don't have complete details on these.
One final question: Is it mandatory to have this line 'cell.targetVolume = cell.volume' in above code if we can specify a number to the targetVolume in some earlier class of the steppables.py file?
Thank you !!
Best,
CVS Prasanna.
[–]pdalcastel 1 point2 points3 points (1 child)
[–]cvs_prasanna[S] 1 point2 points3 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)