make_random_trajectory | R Documentation |
Create random trajectory
make_random_trajectory(start, timescale, settings, step_function, ...)
start |
Position tibble with starting configuration |
timescale |
Numeric vector with time points for the trajectory |
settings |
list with basic properties |
step_function |
function which is called in every time step to calculate next position in sequence |
... |
Extra parameters passed to 'step_function' |
Tibble trajectory object
sett_move <- new_settings( speed = 5, xlim = c(-9, 9), ylim = c(-9, 9), bounce_off_square = FALSE, bounce_off_circle = TRUE, circle_bounce_jitter = pi / 6 ) moment <- position8c %>% add_random_direction() tt <- make_random_trajectory( moment, seq(0, 8, by = 0.1), sett_move, step_direct )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.