mod fv_capstone;
Implementatioin of boids algorithms, with integrated modified version of the original Vicsek Model, utilisinng spatial hashing, with integration into R.
Boid algorithms: Crag Reynolds 1987, see see Vicsek model: Tamás Vicsek 1995, see
Implementation inspired by:
- Daniel Shiffman, Nature of Code, see
- Nannou, creative coding library for Rust inspired by Processing, see
- Nature of Code, see
- OpenSteer see
- Eisen Daniel, see
- Craig Bester, see
- Hastings, Erin J. et al. “Optimization of Large-Scale , Real-Time Simulations by Spatial Hashing.” (2007)
- Rust/R integration enabled by project extendr see
- if you do not have Rust installed, go to rustup and follow instructions for your platform
- run
cargo run --release
in the root directory orcargo run --releae -p boids_app
There are several run configurations that make starting in a set state easy. You can execute any one of these by running the following commnd in the root:
cargo run --release -- -c boids_app/configs/3noisy_v_s.toml
for 3noisy_v_s.toml
boids_app
has a CLI for startup, you can query its parameters by running it with the -h
or --help
switch
- Ensure you have R installed, ref
boidr
is a package that wrapsboids_lib
and provides an interface into R for simulation execution and data retrieval. As of now it is unreleased and needs to be loaded for every new R session, an example is in the experiment2 at the very top bellow library imports.
- C - controls toggle
- R - restart simulation
- I - double the number of agents
- D - delete half the agents
- X - deselect agent
- G - toggle tails (can't update number of agents whilist active)
- F - clustering toggle
- X - deselect clicked agent
- F12 - density based colouring
- [mouse click] - select an agent
- Spacebar - pause simulation
- Escape - close
- Num1 - alignment toggle
- Num2 - cohesion toggle
- Num3 - separation toggle
- Num4 - wander toggle
- A - steering toggle
- M - freeze movement, not updates
- Return - switch replay direction
- Right key - step forward
- Left key - step backward
- F5 - separation bias toggle (if anyone is within separation distance, will ignore cohesion)
- F8 - diagnostics
- F9 - agent labels
- F10 - debug distance
- F11 - debug grid
- C - controls toggle
- Spacebar - pause replay
- M - pause (separate from space)
- X - deselect clicked agent
- Escape - close
- Return - switch replay direction
- Right key - step forward
- Left key - step backward
- F - clustering toggle
- F8 - diagnostics
- F9 - agent labels
- F10 - debug distance
- F11 - debug grid
- F12 - density based colours