Flocking Demo

Python + Kivy



Implement three leaderless flocking behaviors: alignment, cohesion, and separation


There functions were created to calculate three vectors: cohesion, alignment and separation, then all three vectors were added to velocity in the update function. Visible radius were set as follows:


First three sliders in the demo are bind to weight of each vector. The last slider is for adjusting the field of view to change who the visible neighbors are.

If you’d like to explore the code, find it here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s