In this assignment the goal was to control behaviour of swarm particles. So firstly an invisible target was created so that even if there was a single particle it will show attraction toward that single target and start deflecting and cross over the same spot as observed by the trails left behind.

In the swarm behaviour firstly I added all positions to the centre vector. If the closest distance is found then the particle finds the direction of the vector to the centre. If the particle are close to another fly then the direction vector to the closest is taken in account. The vector is added to the velocity. If the closest is not closer than 20 units the particles finds the direction to the centre.The particles move towards the centre direction otherwise if a fly is too close it moves away from it. Finally I normalise the final direction, add speed and add it to the position.

The sliders were there to enhance and further manipulate the behaviour of the particles.

—If the speed increases that provides further thrust to the particle to open up to form longer trails.

—If the number of particles are increased then we observe now not only target is attracting but the distance between two particles are repelling each other hence it forms a mesh like structure binding with each other but yet control in a specific area.

—playing with the sliders we can control and manipulate the tangled structure

Student : Shalini Brahma

Guided by: Angelos Chronis, IAAC