# HG changeset patch # User Michael Guravage # Date 2011-08-26 16:20:01 # Node ID d811502e67f8799be24c751f305e92d223a4f3f5 # Parent 9b6820f9a10b631401b77cd849b2933b7a1c87c7 Added fourth tissue growth protocol: Divide over an arbitrary axis. -- user: Michael Guravage branch 'default' changed src/protocols/MyGrowthModel/mygrowthmodel.cpp diff --git a/src/protocols/MyGrowthModel/mygrowthmodel.cpp b/src/protocols/MyGrowthModel/mygrowthmodel.cpp --- a/src/protocols/MyGrowthModel/mygrowthmodel.cpp +++ b/src/protocols/MyGrowthModel/mygrowthmodel.cpp @@ -32,7 +32,7 @@ QString Mygrowthmodel::ModelID(void) { // specify the name of your model here - return QString( "Divide over explicit axis" ); + return QString( "Divide over an arbitrary axis" ); } // return the number of chemicals your model uses @@ -54,7 +54,9 @@ void Mygrowthmodel::CellHouseKeeping(Cel c->EnlargeTargetArea(par->cell_expansion_rate); if(c->Area() > 2*c->BaseArea()){ - c->DivideOverAxis(Vector(0,1,0)); + double orientation = Pi*RANDOM(); + Vector axis(sin(orientation), cos(orientation), 0.0); + c->DivideOverAxis(axis); } }