src/NFtest/agentcell/cell/cell.cpp
//Changes the cell direction choosen from the given gamma distribution
Changes the cell direction choosen from the given gamma distribution
Changes the cell direction choosen from the given gamma distribution
void AgentCell::changeDirDistribution()
{
	lastDir[X]=dir[X]; lastDir[Y]=dir[Y]; lastDir[Z]=dir[Z];
	lastUp[X]=up[X]; lastUp[Y]=up[Y]; lastUp[Z]=up[Z];
	double angleInRad=NFutil::RANDOM_CLOSED()*2.*NFutil::PI;
	ChemotaxisUtil::genRot3dAboutAxis(rotMat,dir,angleInRad);
	ChemotaxisUtil::applyRotation(rotMat,up);
	angleInRad = gs->gen(0.,180.)*NFutil::PI/180.;
	ChemotaxisUtil::genRot3dAboutAxis(rotMat,up,angleInRad);
	ChemotaxisUtil::applyRotation(rotMat,dir);
}
void AgentCell :: changeDirDistribution ( ) { lastDir [ X ] = dir [ X ] ; lastDir [ Y ] = dir [ Y ] ; lastDir [ Z ] = dir [ Z ] ; lastUp [ X ] = up [ X ] ; lastUp [ Y ] = up [ Y ] ; lastUp [ Z ] = up [ Z ] ; double angleInRad = NFutil :: RANDOM_CLOSED ( ) * 2. * NFutil :: PI ; ChemotaxisUtil :: genRot3dAboutAxis ( rotMat , dir , angleInRad ) ; ChemotaxisUtil :: applyRotation ( rotMat , up ) ; angleInRad = gs -> gen ( 0. , 180. ) * NFutil :: PI / 180. ; ChemotaxisUtil :: genRot3dAboutAxis ( rotMat , up , angleInRad ) ; ChemotaxisUtil :: applyRotation ( rotMat , dir ) ; }
Changes the cell direction choosen from the given gamma distribution
Changes the cell direction choosen from the given gamma distribution
//First, rotate the up vector randomly between 0 and 2pi along the direction axis //This will not change the direction //Second, rotate the direction by the given degree by the set gamma distribution