Info Panel

Press R to restart simulation
Press Space to pause/resume simulation
Hold left click to attract boids
Hold right click to repel boids

Frame Time:
FPS:


What is the Boids algorithm?

Boids is an artificial life program that produces startlingly realistic simulations of flocking behaviour. This allows it to model the movement of groups of birds and fish.

Parameters

Boid Count

The number of boids

Separation

The higher the value, the more every boid will push on every other boid in its protected range

Alignment

The higher the value, the more every boid will steer towards the average direction of every other boid in its visual range

Cohesion

The higher the value, the more every boid will attempt to move to the average position of all boids in its visual range. This is counteracted by the Separation value

Visual Range

The detection range for the boids which affects alignment and cohesion, measured in pixels

Protected Range

The detection range for the boids which affects separation, measured in pixels. This should be less than the visual range, although that is not enforced in this simulation

Mouse Effect

Controls how much the boids are affected by the attraction and repulsion of the mouse

Minimum Speed

Boids will be forced to travel at least this speed, measured in pixels per second

Maximum Speed

Boids will never travel faster than this speed, measured in pixels per second