To begin understanding how to move particles, I did a quick research on the 3 properties that are commonly used to control particles simulation.
- Alignment: steer toward the average heading of local flockmates
- Cohesion: steer to move toward the average position of local flockmates
- Separation: steer to avoid crowding local flockmates
The intention is to simulate the rhythm and harmonic movement of a fish, to give my viewers a sense of oneness (unity) in their mind.
Prototyping & Testing
With the basic knowledge of the 3 properties, I used a physic library in processing to formulate the behaviour of the particles. In the beginning, there were some errors with the physics system whereby the particles are not constrained (anchor) to each other. This was quickly solved by constraining the particle into a “sphere”.
After the particle mechanism is much more stable, I introduced more particles into the system. I have also added “trails” behind the particle, for aesthetic purpose. Every time the code is executed, a different result will be displayed. Perhaps, further, improvement will be to add colours? Flashing lights? Calming background music using minim?