Welcome to the documentation for the dla_3d package!¶
-
class
dla_3d.initialize_system.
initialize_system
(k)¶ Bases:
object
Methods
Find the center of the grid and fill it.
Initialize the grid using the parameters from the constructor.
-
__init__
(k)¶ Constructor for this class.
- Parameters
- k : int
exponent
- N : int
base
- grid : array-like
3d grid of dimensions N x N x N
-
find_center
()¶ Find the center of the grid and fill it.
-
initialize_grid
()¶ Initialize the grid using the parameters from the constructor.
-
-
class
dla_3d.random_walk.
random_walk
(grid, center, inner_radius, outer_radius)¶ Bases:
object
Methods
Initializes the position of the random walkers.
test_vicinity
(grid, center, x0, y0, z0)Search surroundings of a point for filled points and check distance from center.
walk
(grid)Random walk of an initialized walker.
-
__init__
(grid, center, inner_radius, outer_radius)¶ Constructor for random walk.
- Parameters
- grid : array-like
Three-dimensional grid with seed in the center, initialized by the initialize_system class.
- center : array-like
Position of the seed.
- inner_radius : int
Radius of the inner sphere, where random walkers start their path.
- outer_radius :
Radius of the outer sphere. If a walker leaves the outer sphere, its walk will be stopped and a new walker will be released.
-
initialize_walk
()¶ Initializes the position of the random walkers.
- Returns
- x, y, z : int
Initial position of the random walker on the inner sphere.
-
test_vicinity
(grid, center, x0, y0, z0)¶ Search surroundings of a point for filled points and check distance from center.
- Parameters
- grid : array-like
Initialized grid with filled center.
- center : array-like
Position of the center.
- x0, y0, z0 : int
Position of the point in question.
- Returns
- dist : int
Distance of the point from the center.
- isum : int
Sum of grid values in the vicinity of the point. Neighbour points can only vary in one point, i.e. [x0, y0, z+1] or [x0-1, y0, z0], but not [x0+1, y0+1, z0].
-
walk
(grid)¶ Random walk of an initialized walker.
- Returns
- grid : array-like
Updated grid after random walker has finished.
-