Skip to content

Commit 065e631

Browse files
author
Daniel Precioso, PhD
committed
Add function to update positions and headings after one time step in Vicsek model
1 parent a8d64c8 commit 065e631

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

modules/collective-motion/vicsek.qmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ for i in range(num_boids):
219219
xy = np.mod(xy_new, box_size)
220220
# We overwrite xy with the new positions after applying periodic boundaries
221221
```
222+
:::
222223
223224
Do you have it? Excellent! Last but not least, we can put everything together in a function that takes the current positions and headings and returns the updated positions and headings after one time step.
224225

0 commit comments

Comments
 (0)