| simulate_moving_circles | R Documentation |
Generate patterns of two circles moving toward each other horizontally. Creates mutually exclusive signals where overlapping pixels are assigned to signal_1 (circle 1). The circles start at fixed horizontal distances from the midline and move toward the center.
simulate_moving_circles(
grid_size = 60,
radius_seq = 6:14,
n_steps = 10,
center_distance = 30,
radius2_factor = 1.5,
seed = NULL,
verbose = TRUE
)
grid_size |
Size of the spatial grid (default: 60) |
radius_seq |
Vector of radii for circle 1 (default: 6:14) |
n_steps |
Number of movement steps (default: 10) |
center_distance |
Initial horizontal distance from midline for both centers (default: 30) |
radius2_factor |
Circle 2 radius = radius_seq * radius2_factor (default: 1.5) |
seed |
Random seed for reproducibility (default: 123) |
verbose |
Logical; if TRUE, show progress bar and messages (default: TRUE) |
List of data frames, each containing X, Y coordinates and signal_1, signal_2 binary signals
# Generate moving circles patterns with default parameters
patterns <- simulate_moving_circles()
# Custom parameters
patterns <- simulate_moving_circles(
grid_size = 80,
radius_seq = c(8, 12, 16),
n_steps = 8,
center_distance = 35,
radius2_factor = 1.2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.