Method to initialize a growthSimulation object
Usage
init_simulation(
universePolygon,
gridFieldSize = 1,
gridFieldLayers = 3,
deltaTime = 1/6,
rMotion = 0.1
)
Arguments
- 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 \(\mu\)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 \(\mu\) per minute. Default: 0.1 \(\mu\)m
Value
Object of class growthSimulation.
Details
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 \(\mu\)m.
"Rectangle_<X>_<Y>" is a, *surprise*, rectangle. `<X>` and `<Y>` should be integers specifying the width and height in \(\mu\)m, respectively.
"Kiel_<L>" let microbes thrive within Kiel's city limits. Use `<L>` to specify the latitude dimension in \(\mu\)m (integer). The longitude is automatically scaled accordingly.
Examples
# 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)