In 1986 Craig Reynolds made a computer model of coordinated animal motion such as bird flocks and fish schools. It was based on three dimensional computational geometry of the sort normally used in computer animation or computer aided design. He called the generic simulated flocking creatures boids. The basic flocking model consists of three simple steering behaviors which describe how an individual boid maneuvers based on the positions and velocities its nearby flockmates (see Rules).
Please visit this link for more. All credits to Craig Reynolds.
None ! Exept for the fact that the simulation seems to speed up on mouse events (for eg. moving the mouse in the window), could be a bug... nah. Also you can tweak some constants in the boid.rs file and in the main.rs file. Do not expect more than 400 updates per second, and for some strange reason the frame rate can not be kept around 60 even with window.set_max_fps(60);
for more than one frame of animation.
All dependencies can be found in cargo.toml :
piston_window = "*"
find_folder = "*"
fps_counter = "*"
rand = "*"
math_vector = { git = "https://github.com/ThomasByr/rust-math_vector" }
- initial commit
- boids on the screen (their position was a little off)
- quadtree acceleration which bring a
n*log(n)
time complexity - used custom 3d vector structure