Flocking - Boids?

Hi all! I’m doing some research to implement Craig Reynolds’ Boids algorithm / Flocking in SC and I was wondering if anyone has worked on this before?

Specifically I’m looking for an implementation that works with Reynolds’ Flocking rules like Alignment, Cohesion and Separation: Boids (Flocks, Herds, and Schools: a Distributed Behavioral Model)

I’ve seen a lot of implementations of this in other programming languages like JS but I’m not sure where/how to start doing it in SC :sweat_smile:

Thanks in advance! :slight_smile:

Hi @Maria_Castro and welcome to the forum…

a quick search turned this work by @woolgathering up - hope it helps!

1 Like

Hi again @semiquaver ! Thanks for sharing it with me! I’m new into the forum indeed, still exploring it

It helps a lot! It’s exactly what I was looking for! For some reason I got an error running the Boids3D code example due to a custom method I guess, but I’ll dig into it, TY! ^-^

1 Like

Have you installed GitHub - supercollider-quarks/VectorSpace: Classes for manipulation of vectors and vector valued functions, such as scalar fields and vector fields? Apparently the boids implementation relies on it.

It is also worth noting that the excellent RedUniverse has a boids implementation, see redUniverse/HelpSource/Quarks/redUniverse/Examples/050-boids.scd at master · redFrik/redUniverse · GitHub ff

Oo, do you turn them into moving flocking sound sources?