Boids

This code is based on the boids idea by craig reynolds. For more information visit https://www.red3d.com/cwr/boids/. The flocking behaviour of the boids tries to simulate the natural way fish or birds would move in groups. This simulation only needs three core rules: Alignment, cohesion and separation. You can adjust the sliders to change the impact of the corresponding rule to the simulation.

Alignment

Steer towards the average heading of local flockmates.

Cohesion

Steer to move toward the average position of local flockmates.

Separation

Steer to avoid crowding local flockmates.

Your browser does not support the HTML5 canvas tag.

alignment =

cohesion =

separation =

draw view range:

Cookie Policy

We use cookies to enhance your browsing experience and analyze our traffic. By clicking 'Accept', you consent to our use of cookies.

Cookies improve user experience

When you click 'Accept all' cookies, JayKayCooperations can give you the best user experience. Cookies store information about how a user interacts with a website. All your data is anonymised and cannot be used to identify you. You can always change your consent again under 'Cookies' in the website footer.

We are using our own cookies and cookies set by our partners for the following purposes: