# Particle Prototype

### Quick Exploration

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”.

# Further tweaks

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?

# Live Demo of the Simulation

1. dejan.grba says:

Good job Samuel!
You have solved the basics quickly and opened a lot of space for fine tuning and further experimentation.

2. dejan.grba says:

Hi Samuel,

As you have established key functionality of your study, you can proceed with refining and extending it. Here are some ideas, approximately ordered by complexity, but please try them out according to your own preference and priority:

2. Instead of constraining them into a circle, try gradual (but not too slow) initial appearance of the particles by entering from various directions outside the sketch window, and their accumulation into the school. Some particles can also leave the school by exiting the sketch window.

3. More complex scenarios:

– Mix 2 or 3 schools of different “species” with different behavior/movement and aggregation criteria. Now the particles of one species also (probably) have to avoid the particles of the other species, but some of them may make mistakes, etc.

– Introduce a “predator” to a school of single species to influence the shape dynamics.

4. Using simple 3D geometries for the particles, add a third dimension to the space, and visualize it with shading and perspective (size change) of the particles. You would not need the trailing for this scenario. You should start with a singe species of course.

I hope some of these ideas will be useful and inspiring.

3. dejan.grba says:

I would also appreciate if you can send me your Processing sketches up to now.

Thanks.