bounce_off_square | R Documentation |
Check for square-arena bouncing and recalculate directions
bounce_off_square(moment, time_next, settings)
moment |
Position tibble with extra columns 'direction' and 'speed' |
time_next |
Next timepoint |
settings |
list with basic properties |
Like 'moment', but some directions are adjusted (reversed, swapped), if there were a collision with arena border in next time point ('timestep')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.