Your browser doesn’t support the HTML canvas element.
Boids.
“The bird is okay even though he doesn’t understand the world. You’re that bird looking at the monitor, and you’re thinking to yourself, ‘I can figure this out.’ Maybe you have some bird ideas. Maybe that’s the best you can do.”
— Terry A. Davis


#Talking about birds

Watching birds, is an exciting undertaking, you kind of know what to excpect and still it sparks something in you to see another living thing do and feel something you will never be able to accomplish.
Then agian looking at birds does not only bring you to the edge of ego death, it also has quite the interresting history from an algorithmic standpoint.

In the mid‑1980s, computer graphics researcher Craig Reynolds set out to animate groups without hand‑animating every individual. Spectating the behaviour of birds led him down a sadly poorly documented bird shaped rabbit hole.

Emerging agian in 1987 he presented his findings at SIGGRAPH 1987 -> boids—short for “bird‑oid objects” i.e. bird like objects
showing that three simple rules were enough to produce convincing flocking, herding, and schooling. The idea quickly became a touchstone for “behavioral animation” and artificial life.

To prove it worked on a real project, Reynolds and colleagues at the Symbolics Graphics Division helped make a short film, Stanley and Stella in: Breaking the Ice (1987), swarms of birds and fish moving in groups, without having to animate each individual actor. years later, the technique helped drive crowd and swarm shots in Batman Returns (1992).

Reynolds didn’t invent the entire idea of rule‑based schooling in isolation. Biologist Ichiro Aoki had already used a computer model (1982) to study how fish could school using simple interactions like attraction, repulsion, and parallel orientation. Boids popularized these ideas in graphics and games, and the two lines of work cross‑pollinated for decades afterward.

#Lets get moving

The essence of boids and the way they behave lies in 3 simple to understand rules:

Using just these 3 easy to understand rules emergent behaviour is born

...emergence occurs when a complex entity has properties or behaviors that its parts do not have on their own, and emerge only when they interact in a wider whole.

In case of boids, swarming behavior is never explicitly simulated, purely simple rules of individual boids combine to create swarming

#Turning some Knobs

→ Separation

Separation is the please leave me alone, rule. Each boid carries a tiny band around itself and steers away from neighbors that drift inside that radius. Turn the Separation range up, and this radius gets bigger.This will make crowds loosen and make the swarm behave almost ant like. Crank the Separation weight and the pushing becomes more noticable, like birds that really don’t want wing tips brushing. It’s a small rule that prevents accidents and gives the flock an almost polite, spacing.

Toggle the radius on if you want to see those invisible bands drawn out. No one is steering the flock they’re just avoiding bruised feathers.

10
0.80

→ Alignment

Alignment is the go with the flow rule. A boid peeks at its neighbors and rotates toward their average direction.Emerging from this is an almost political system, local collections of boids are aligning themselfes together. Increase the Alignment range, and consensus spreads farther,the idea of a common direction, travel through the flock. Boost the Alignment weight, and turns become smoother as if the whole group agreed on a direction beforehand

Flip the range overlay to watch how a wider neighborhood softens motion and produces those broad, cinematic sweeps.

27
0.08

→ Cohesion

Cohesion is the stay with us rule. Each boid leans toward the average position of its neighbors, a gravity that keeps the group from dissolving. Grow the Cohesion range, and the center of mass feels larger, pulling scattered boids back into the flock. Raise the Cohesion weight, and that pull tightens./p>

Turn on the cohesion range to see the neighborhood a boid considers “home”. With just this gentle tug, plus a little space and flow, complex shapes appear: ribbons, rings, waves, emergence from three rules and a handful of sliders.

100
0.02

Emergence is a wonderfull topic to explore that holds a lot of suprises. In the end its just a bunch of numbers trying to average themselves with pre defined rules, but ofcourse as a person we can not keep ourselves from watching birds.


Anyways i made a seperate Playground if you want to explore the patterns a bit more, have fun!