View source: R/growthSimulation.R
init_simulation | R Documentation |
Method to initialize a growthSimulation object
init_simulation( universePolygon, gridFieldSize = 1, gridFieldLayers = 3, deltaTime = 1/6, rMotion = 0.1 )
universePolygon |
A two column matrix specifying the x and y coordinates of the polygon corners, that describe the growth environment boundaries. Alternatively, a character indicating one of the polygon presets can be provided (see details). |
gridFieldSize |
double. Distance between neighboring environments 3D mesh field elements (rhombic dodecahedrons) in μm. |
gridFieldLayers |
integer. z-dimension (height) as the number of layers of field elements. |
deltaTime |
double specifying the length of each time step for the simulation in hours. |
rMotion |
double. Maximum distance a cell can travel by means of Brownian motion in μ per minute. Default: 0.1 μm |
Available universe polygon presets:
"Petri_<R>" is a Petri dish-like object (actually a 99-corner polygon), where '<R>' should be replaced with an integer, indicating the radius of the dish in μm.
"Rectangle_<X>_<Y>" is a, *surprise*, rectangle. '<X>' and '<Y>' should be integers specifying the width and height in μm, respectively.
"Kiel_<L>" let microbes thrive within Kiel's city limits. Use '<L>' to specify the latitude dimension in μm (integer). The longitude is automatically scaled accordingly.
Object of class growthSimulation.
# Construction a square environment of dimensions 100\eqn{\mu}m x 120\eqn{\mu}m x 3\eqn{\mu}m sim <- init_simulation(cbind(c(-50, -50, 50, 50), c(-60, 60, 60, -60)), gridFieldSize = 1, gridFieldLayers = 3) sim <- init_simulation("rectangle_100_120", gridFieldSize = 1, gridFieldLayers = 3) # Construct a Petri dish-like simulation environment (radius: 75 \eqn{\mu}m) sim <- init_simulation("Petri_75", gridFieldSize = 1, gridFieldLayers = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.