


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Input: Cell C PDividing = getK 3 (C.N umAttachments) โ PP rolif eration //Division occurs with probability PDividing if C decides to divide then Dir โโ direction chosen randomly between 1 to 6 (Figure 3) while direction chosen is occupied do Dir = (Dir + 1) M od 6 Put a new cell CN at (C.center + Dir) C.Age โโ CN .Age โโ 0 C.quiescent โโ CN .quiescent โโ T rue CN separates from C with probability PSeparation
for C 1 โโ 1 to N U M CELLS do for C 2 โโ C 1 + 1 to N U M CELLS do if CELLS[C 1 ] And CELLS[C 2 ] do not belong to same aggregate then Dist โโ Distance between CELLS[C 1 ] and CELLS[C 2 ] if Dist โค CELLS[C 2 ].RM ax then CELLS[C 1 ].N eighborSet.add(C 2 ) if Dist โค CELLS[C 1 ].RM ax then CELLS[C 2 ].N eighborSet.add(C 1 )
foreach Cell in CELLS do Initialize values of all receptors to zero foreach OtherCell in Cell.N eighborSet do foreach Ri in Cell.Receptors do Dist โโ Distance between OtherCell and Ri Ri.V alue+ = (OtherCell.k 1 โ C 0 )/(1 + Dist) Cell.Gradient โโ Calculate gradient from Equation 3 Cell.GradientAngle โโ Calculate theta from Equation 3
for C 1 โโ 1 to N U M CELLS do for C 2 โโ C 1 + 1 to N U M CELLS do if CELLS[C 1 ] and CELLS[C 2 ] do not belong to same aggregate then Dist โโ Distance between CELLS[C 1 ] and CELLS[C 2 ] if Dist < 2 โ CellRadius then Aggregate 1 โโ CELLS[C 1 ].AggregateN umber Aggregate 2 โโ CELLS[C 2 ].AggregateN umber if Both cells are single then Form a new doublet else if Only one is single then //Assume CELLS[C 2 ] is single CELLS[C 2 ] joins Aggregate 1 else //Assume Aggregate1 has more cells All members of Aggregate2 joins Aggregate 1 Aggregate2 is destroyed CELLS[C 1 ].N umberOf Attachments + + CELLS[C 2 ].N umberOf Attachments + +
foreach Cell in CELLS do Cell.Age+ = SimulationStepT ime if Cell.Quiescent = T rue And Cell.Age >= QuiescentT ime then Cell.Quiescent = F alse else if Cell is single And Cell.Age >= TApoptosis then Cell.isDying = T rue Cell dies with probability 1 โ PLive (Figure 2:Right) if Cell dies then Remove Cell from CELLS
foreach GridP oint (x, y) do ChemoGrid[x][y] = 0 foreach Cell in CELLS do foreach GridP oint (x, y) within Cell.RM ax distance from Cell do Dist โโ Distance between Cell and GridP oint ChemoGrid[x][y]+ = (Cell.k 1 โ C 0 )/(1 + Dist)