(* Content-type: application/vnd.wolfram.cdf.text *) (*** Wolfram CDF File ***) (* http://www.wolfram.com/cdf *) (* CreatedBy='Mathematica 10.0' *) (*************************************************************************) (* *) (* The Mathematica License under which this file was created prohibits *) (* restricting third parties in receipt of this file from republishing *) (* or redistributing it by any means, including but not limited to *) (* rights management or terms of use, without the express consent of *) (* Wolfram Research, Inc. For additional information concerning CDF *) (* licensing and redistribution see: *) (* *) (* www.wolfram.com/cdf/adopting-cdf/licensing-options.html *) (* *) (*************************************************************************) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 1064, 20] NotebookDataLength[ 568470, 11406] NotebookOptionsPosition[ 567779, 11360] NotebookOutlinePosition[ 568301, 11382] CellTagsIndexPosition[ 568213, 11377] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Agent-based three-dimensional model for spheroid formation", "Title", CellChangeTimes->{{3.605847158321085*^9, 3.605847173907285*^9}}], Cell["\<\ supplementary material for \[OpenCurlyDoubleQuote]Lateral assembly of \ N-cadherin drives tissue integrity by stabilizing adherens junctions\ \[CloseCurlyDoubleQuote]\ \>", "Subtitle", CellChangeTimes->{{3.605847181020285*^9, 3.605847184412485*^9}, { 3.6058586233326855`*^9, 3.605858644155885*^9}, 3.609052764611802*^9, { 3.616837575664065*^9, 3.6168375791740403`*^9}, {3.616837704779604*^9, 3.616837705231984*^9}, {3.6186539841883717`*^9, 3.618653985718172*^9}}], Cell["\<\ S. Garg*, S. C. Fischer*, E. M. Schuman+, E. H.K. Stelzer+ * authors contributed equally +authors contributed equally \ \>", "Text", CellChangeTimes->{3.6168377111441183`*^9, 3.616837744667014*^9}], Cell[CellGroupData[{ Cell["Initialization", "Section", CellChangeTimes->{{3.6058585484330854`*^9, 3.605858551216885*^9}}], Cell[BoxData[ RowBox[{"Needs", "[", RowBox[{"\"\\"", ",", " ", RowBox[{ RowBox[{"NotebookDirectory", "[", "]"}], "<>", "\"\\""}]}], "]"}]], "Input", CellChangeTimes->{{3.5691664151297865`*^9, 3.569166415759787*^9}, { 3.5691666239140825`*^9, 3.5691666838281674`*^9}, {3.605854554249485*^9, 3.605854577106885*^9}, {3.60976221291532*^9, 3.6097622214485197`*^9}, 3.6097622678741198`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Names", "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{{3.567004438640733*^9, 3.5670044667647724`*^9}, 3.6058545863186855`*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"aAdh\"\>", ",", "\<\"aExcl\"\>", ",", "\<\"centerWell\"\>", ",", "\<\"cExcl\"\>", ",", "\<\"cut\"\>", ",", "\<\"densityDiff\"\>", ",", "\<\"diffCoeff\"\>", ",", "\<\"dt\"\>", ",", "\<\"epsAdh\"\>", ",", "\<\"maxBonds\"\>", ",", "\<\"maxExcl\"\>", ",", "\<\"ModelSpheroidFormation\"\>", ",", "\<\"msfAdhesionforce\"\>", ",", "\<\"msfBondObjNumCluster\"\>", ",", "\<\"msfBondRemoval\"\>", ",", "\<\"msfBondsInCluster\"\>", ",", "\<\"msfBondsNum\"\>", ",", "\<\"msfCircleIniCondHex\"\>", ",", "\<\"msfDataEvaluation\"\>", ",", "\<\"msfDistanceObjects\"\>", ",", "\<\"msfIniClustForm\"\>", ",", "\<\"msfInitialisation\"\>", ",", "\<\"msfIniVolumeExclStrength\"\>", ",", "\<\"msfIniVolumeExclusion\"\>", ",", "\<\"msfLabellingClusterBondForm\"\>", ",", "\<\"msfLabellingClusterBondRemoval\"\>", ",", "\<\"msfMain\"\>", ",", "\<\"msfMovementCluster\"\>", ",", "\<\"msfMovementOneObj\"\>", ",", "\<\"msfNBondCluster\"\>", ",", "\<\"msfNBonds\"\>", ",", "\<\"msfOutsideSingleCell\"\>", ",", "\<\"msfSortCluster\"\>", ",", "\<\"msfVolExclusionForce\"\>", ",", "\<\"msfVolExlusionUp\"\>", ",", "\<\"msfVolumeExclusion\"\>", ",", "\<\"myNorm\"\>", ",", "\<\"myNormalise\"\>", ",", "\<\"numTimePoints\"\>", ",", "\<\"numTimePoints$\"\>", ",", "\<\"pBinding\"\>", ",", "\<\"pUnbinding\"\>", ",", "\<\"radiusObject\"\>", ",", "\<\"radiusWell\"\>"}], "}"}]], "Output", CellChangeTimes->{{3.608950678584169*^9, 3.6089506847149687`*^9}, 3.6097621298453197`*^9, 3.60976224651772*^9, 3.60976232303572*^9, 3.6168377905143566`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData["$Packages"], "Input", CellChangeTimes->{{3.569213209777449*^9, 3.5692132115714607`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"ComputationalGeometry`\"\>", ",", "\<\"ModelSpheroidFormation`\"\>", ",", "\<\"GetFEKernelInit`\"\>", ",", "\<\"TemplatingLoader`\"\>", ",", "\<\"ResourceLocator`\"\>", ",", "\<\"PacletManager`\"\>", ",", "\<\"System`\"\>", ",", "\<\"Global`\"\>"}], "}"}]], "Output", CellChangeTimes->{ 3.5692132141610775`*^9, 3.605854591582285*^9, 3.6058612669224854`*^9, 3.6058697071506853`*^9, 3.605869757830285*^9, 3.6058705748228855`*^9, 3.605870922994457*^9, 3.607319434864171*^9, 3.6073302745631266`*^9, 3.6073327715387735`*^9, 3.6074066795808907`*^9, {3.6084526255147047`*^9, 3.608452642289412*^9}, 3.6088882025751753`*^9, 3.6088889874111757`*^9, 3.6088893042907753`*^9, 3.6088894637535753`*^9, 3.6088896138207755`*^9, 3.608889835609976*^9, 3.6088900452507753`*^9, 3.6088902623619757`*^9, 3.6088922245631757`*^9, 3.608892695793976*^9, 3.6088927582407756`*^9, 3.6088945975393753`*^9, 3.6088946911091757`*^9, 3.6088949081055756`*^9, 3.6088953870111756`*^9, {3.608950678662169*^9, 3.608950684746169*^9}, 3.60976212987652*^9, 3.6097622465489197`*^9, 3.6097623230669203`*^9, 3.616837790529956*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "ModelSpheroidFormation"}]], "Input", CellChangeTimes->{{3.56921227002822*^9, 3.569212275815857*^9}, { 3.605854598538685*^9, 3.605854599651285*^9}}], Cell[BoxData[ StyleBox["\<\"Three-dimensional agent-based model for spheroid \ formation\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.6168377907015486`*^9}, CellTags->"Info3616844990-5226760"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Sample simulation", "Section", CellChangeTimes->{{3.605851610777685*^9, 3.6058516129248853`*^9}}], Cell["\<\ Runtime: 100 interations for the parameter values in Table 3 take 40 s on a \ work station with 96 GB RAM and Processor Intel(R) Xeon(R) CPU E5630 @2.53 \ GHz.\ \>", "Text", CellChangeTimes->{{3.605856433574085*^9, 3.6058564443746853`*^9}, { 3.609053083366602*^9, 3.609053087719002*^9}, {3.6168378230916953`*^9, 3.6168378235128765`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"numObjects", ",", "clusterList"}], "}"}], "=", RowBox[{"msfInitialisation", "[", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.605854228449685*^9, 3.6058542293564854`*^9}, { 3.605854430936885*^9, 3.605854447683285*^9}, {3.6058547465026855`*^9, 3.605854793286685*^9}, {3.605854856106685*^9, 3.605854903837685*^9}, { 3.605855148499285*^9, 3.605855179847085*^9}, {3.605856031516285*^9, 3.605856031641085*^9}, 3.605861275767085*^9, 3.607410992873234*^9, { 3.6084526811309423`*^9, 3.6084526812269807`*^9}, 3.6088875914887753`*^9, 3.6088884766671753`*^9, {3.6088889956167755`*^9, 3.608888999859976*^9}, { 3.6088926702099752`*^9, 3.6088926793047757`*^9}, {3.6088929390135756`*^9, 3.6088929455499754`*^9}, 3.608950669239769*^9, 3.608951025523769*^9}], Cell[BoxData[ RowBox[{ RowBox[{"clusterList", "=", RowBox[{"Nest", "[", RowBox[{"msfIniVolumeExclusion", ",", "clusterList", ",", "10"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.605854228449685*^9, 3.6058542293564854`*^9}, { 3.605854430936885*^9, 3.605854447683285*^9}, {3.6058547465026855`*^9, 3.605854793286685*^9}, {3.605854856106685*^9, 3.605854903837685*^9}, { 3.605855148499285*^9, 3.605855179847085*^9}, {3.605855822982685*^9, 3.605855833464085*^9}, {3.6058560203860855`*^9, 3.605856022574085*^9}, { 3.6058561076804852`*^9, 3.6058561235484853`*^9}, {3.605856176046285*^9, 3.605856177077885*^9}, {3.6058562378384852`*^9, 3.6058562399484854`*^9}, 3.607319863877021*^9, 3.6074072232062054`*^9, {3.6088890760659757`*^9, 3.6088890800595756`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"clusterList", "=", RowBox[{"msfIniClustForm", "[", "clusterList", "]"}]}], ";"}]], "Input", CellChangeTimes->{3.608889103833976*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"devClusters", "=", RowBox[{"NestList", "[", RowBox[{"msfMain", ",", "clusterList", ",", "numTimePoints"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"msfDataEvaluation", "[", "devClusters", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.605854228449685*^9, 3.6058542293564854`*^9}, { 3.605854430936885*^9, 3.605854447683285*^9}, {3.6058547465026855`*^9, 3.605854793286685*^9}, {3.605854856106685*^9, 3.605854903837685*^9}, { 3.605855148499285*^9, 3.605855179847085*^9}, {3.605855822982685*^9, 3.605855833464085*^9}, {3.6058560203860855`*^9, 3.605856022574085*^9}, { 3.6058561076804852`*^9, 3.6058561235484853`*^9}, {3.605856176046285*^9, 3.605856177077885*^9}, {3.6058562378384852`*^9, 3.6058562399484854`*^9}, 3.607319863877021*^9, {3.6088892040639753`*^9, 3.6088892052183757`*^9}, 3.608890618127576*^9, {3.609053010998202*^9, 3.609053028610602*^9}, { 3.6097620874913197`*^9, 3.60976208956612*^9}}], Cell[CellGroupData[{ Cell["Visualisation", "Subsubsection", CellChangeTimes->{{3.605856384500685*^9, 3.605856417955685*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"plotObjectsTime", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Partition", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", RowBox[{"1", ";;", "2"}], "]"}], "]"}], "-", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], ",", RowBox[{"#", "[", RowBox[{"[", RowBox[{"-", "1"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", RowBox[{"4", ",", "All", ",", RowBox[{"1", ";;", "2"}]}], "]"}], "]"}]}], "}"}], "]"}], ",", "2"}], "]"}], ",", "4"}], "]"}], "&"}], "/@", RowBox[{"devClusters", "[", RowBox[{"[", "i", "]"}], "]"}]}], ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"numTimePoints", "+", "1"}]}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.542531279274908*^9, 3.5425312923945312`*^9}, { 3.542531333609803*^9, 3.5425315370029607`*^9}, {3.5425315887170515`*^9, 3.5425315909478555`*^9}, {3.54253167891641*^9, 3.5425317305525007`*^9}, { 3.5425317653561616`*^9, 3.5425317712997723`*^9}, 3.542531894929989*^9, { 3.542531962478108*^9, 3.542532017671005*^9}, {3.5425323294999523`*^9, 3.542532332697958*^9}, {3.542532371292426*^9, 3.5425323722596273`*^9}, { 3.5425324170941067`*^9, 3.542532767611122*^9}, {3.54253280048038*^9, 3.54253283461324*^9}, {3.542532866499696*^9, 3.5425329074965677`*^9}, { 3.5425329402722254`*^9, 3.5425330288491807`*^9}, {3.542533167876625*^9, 3.54253319364787*^9}, {3.5425340142249117`*^9, 3.542534048076971*^9}, { 3.5425341382295294`*^9, 3.542534187510016*^9}, 3.542534625153185*^9, 3.542534854192787*^9, {3.542534915017294*^9, 3.542534920680104*^9}, 3.5425365153333054`*^9, 3.5426181140202007`*^9, 3.5426182445144296`*^9, { 3.5426183001441274`*^9, 3.5426183059005375`*^9}, {3.5435600897416544`*^9, 3.543560152151224*^9}, {3.5435681226608534`*^9, 3.5435681379644804`*^9}, { 3.543645810164946*^9, 3.543645818838561*^9}, {3.545034381991109*^9, 3.5450343957971334`*^9}, 3.5456435772638397`*^9, {3.5479618582324452`*^9, 3.5479618610092497`*^9}, {3.550469291539961*^9, 3.550469299542775*^9}, { 3.551066666877631*^9, 3.551066670106837*^9}, {3.5510667842834373`*^9, 3.551066796763459*^9}, {3.5535678001760263`*^9, 3.5535678004724264`*^9}, 3.559360358232071*^9, 3.560767875916478*^9, {3.5607713311540785`*^9, 3.560771331278878*^9}, {3.566127016552148*^9, 3.566127018018548*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"xPlotRange", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Min", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"plotObjectsTime", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "4", ",", "1"}], "]"}], "]"}], "]"}], "-", "radiusObject"}], ",", RowBox[{ RowBox[{"Max", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"plotObjectsTime", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "4", ",", "1"}], "]"}], "]"}], "]"}], "+", "radiusObject"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"yPlotRange", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Min", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"plotObjectsTime", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "4", ",", "2"}], "]"}], "]"}], "]"}], "-", "radiusObject"}], ",", RowBox[{ RowBox[{"Max", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"plotObjectsTime", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "4", ",", "2"}], "]"}], "]"}], "]"}], "+", "radiusObject"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"zPlotRange", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Min", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"plotObjectsTime", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "4", ",", "3"}], "]"}], "]"}], "]"}], "-", "radiusObject"}], ",", RowBox[{ RowBox[{"Max", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"plotObjectsTime", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"All", ",", "4", ",", "3"}], "]"}], "]"}], "]"}], "+", "radiusObject"}]}], "}"}]}], ";"}]}], "Input", CellChangeTimes->{{3.542531279274908*^9, 3.5425312923945312`*^9}, { 3.542531333609803*^9, 3.5425315370029607`*^9}, {3.5425315887170515`*^9, 3.5425315909478555`*^9}, {3.54253167891641*^9, 3.5425317305525007`*^9}, { 3.5425317653561616`*^9, 3.5425317712997723`*^9}, 3.542531894929989*^9, { 3.542531962478108*^9, 3.542532017671005*^9}, {3.5425323294999523`*^9, 3.542532332697958*^9}, {3.542532371292426*^9, 3.5425323722596273`*^9}, { 3.5425324170941067`*^9, 3.542532767611122*^9}, {3.54253280048038*^9, 3.54253283461324*^9}, {3.542532866499696*^9, 3.5425329074965677`*^9}, { 3.5425329402722254`*^9, 3.5425330288491807`*^9}, {3.542533167876625*^9, 3.54253319364787*^9}, {3.5425340142249117`*^9, 3.542534048076971*^9}, { 3.5425341382295294`*^9, 3.542534187510016*^9}, 3.542534625153185*^9, 3.542534854192787*^9, {3.542534915017294*^9, 3.542534920680104*^9}, 3.5425365153333054`*^9, 3.5426181140202007`*^9, 3.5426182445144296`*^9, { 3.5426183001441274`*^9, 3.5426183059005375`*^9}, {3.5435600897416544`*^9, 3.543560152151224*^9}, {3.5435681226608534`*^9, 3.5435681379644804`*^9}, { 3.543645810164946*^9, 3.543645818838561*^9}, {3.545034381991109*^9, 3.5450343957971334`*^9}, 3.5456435772638397`*^9, {3.5479746430629005`*^9, 3.5479746445449033`*^9}, {3.5607713376280785`*^9, 3.5607713732740784`*^9}, {3.608895893619176*^9, 3.6088958989855757`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"objPairs", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Partition", "[", RowBox[{ RowBox[{"Riffle", "[", RowBox[{ RowBox[{"Range", " ", "[", RowBox[{"#", "-", "1"}], "]"}], ",", "#", ",", RowBox[{"{", RowBox[{"2", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}]}], "]"}], ",", "2"}], "]"}], "&"}], "/@", RowBox[{"Range", "[", "numObjects", "]"}]}], ",", "1"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5432284332779875`*^9, 3.54322843449479*^9}, { 3.5432284666932464`*^9, 3.543228534600166*^9}, {3.5432287021444597`*^9, 3.5432287097572737`*^9}, {3.545124829840577*^9, 3.545124830620579*^9}, 3.5504693651720905`*^9, 3.608951026116569*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"well", "\[NotEqual]", "\"\\""}], ",", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics3D", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "0.5", "]"}], ",", " ", RowBox[{"If", "[", RowBox[{"singleCells", ",", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "<", RowBox[{"numObjects", "+", "1"}]}], ",", "Gray", ",", RowBox[{ RowBox[{"ColorData", "[", "54", "]"}], "[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}], ",", "radiusObject"}], "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], ">", "numObjects"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"ColorData", "[", "54", "]"}], "[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}], ",", "radiusObject"}], "]"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"Which", "[", RowBox[{ RowBox[{"label", "==", "\"\\""}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "3", "]"}], "]"}], ",", "12", ",", "Bold", ",", " ", "Black"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}]}], "]"}], ",", RowBox[{"label", "\[Equal]", "\"\\""}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], ">", "numObjects"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "12", ",", "Bold", ",", " ", "Black"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "}"}], "&"}], "/@", RowBox[{"plotObjectsTime", "[", RowBox[{"[", RowBox[{"Round", "[", RowBox[{ RowBox[{"j", "/", "dt"}], "+", "1"}], "]"}], "]"}], "]"}]}], ",", RowBox[{"Axes", "\[Rule]", "True"}], ",", " ", RowBox[{"Lighting", "\[Rule]", "\"\\""}], ",", RowBox[{"ImageSize", "\[Rule]", "Medium"}]}], "]"}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "0.3", "]"}], ",", "Blue", ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "4000"}], "}"}], ",", "4000"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"well", "\[Equal]", "\"\\""}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"xPlotRange", ",", "yPlotRange", ",", "zPlotRange"}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "4000"}], ",", "4000"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "4000"}], ",", "4000"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "4000"}], "}"}]}], "}"}]}]}], "]"}]}], "]"}], ",", RowBox[{"Graphics3D", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "0.5", "]"}], ",", " ", RowBox[{"If", "[", RowBox[{"singleCells", ",", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "<", RowBox[{"numObjects", "+", "1"}]}], ",", "Gray", ",", RowBox[{ RowBox[{"ColorData", "[", "54", "]"}], "[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}], ",", "radiusObject"}], "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], ">", "numObjects"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"ColorData", "[", "54", "]"}], "[", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}], ",", "radiusObject"}], "]"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"Which", "[", RowBox[{ RowBox[{"label", "==", "\"\\""}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "3", "]"}], "]"}], ",", "12", ",", "Bold", ",", " ", "Black"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}]}], "]"}], ",", RowBox[{"label", "\[Equal]", "\"\\""}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], ">", "numObjects"}], ",", RowBox[{"Text", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}], ",", "12", ",", "Bold", ",", " ", "Black"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "4", "]"}], "]"}]}], "]"}]}], "]"}]}], "]"}]}], "}"}], "&"}], "/@", RowBox[{"plotObjectsTime", "[", RowBox[{"[", RowBox[{"Round", "[", RowBox[{ RowBox[{"j", "/", "dt"}], "+", "1"}], "]"}], "]"}], "]"}]}], ",", RowBox[{"Axes", "\[Rule]", "True"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"xPlotRange", ",", "yPlotRange", ",", "zPlotRange"}], "}"}]}], ",", " ", RowBox[{"Lighting", "\[Rule]", "\"\\""}], ",", RowBox[{"ImageSize", "\[Rule]", "Medium"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "0", ",", "\"\