The aim of the code is to highlight the ability of fluids or flow and its morphogenetic properties. Through the deposition and movement of particles within the flow, you can start to visualise how forces can start to form objects.

image credit:

http://hpcvis.com/vis/images/3d-vorticity/vpic-1/asym-rot-ui-lut2-l.png

image credit:

https://users.dimi.uniud.it/~gianluca.gorni/Immagini/streamOnSurface.gif

image credit:

https://users.dimi.uniud.it/~gianluca.gorni/Immagini/LevelSetProjected.GIF

Many of the natural geological formations of the earth are attributed to this behaviour. How can we start to simulate, visualise and change the parameters of the flow and forces to create similar natural forms?

Techniques

In order to create the simulation, it is first necessary to abstract the idea of material deposition. In this case, we will be utilising particles systems to give a standardized representation of matter, in the form of particles. Next, a clear visualisation space or boundary must be defined, so that the results and the changes within the system is observable. Finally, the last step involves the creation of forces that the particles will be subjected to. For this exercise, a reference has been taken from Daniel Shiffman’s “Nature of Code”. In his example, he uses the notion of vector fields, or a field of vectors that the particles will follow, otherwise known as Flow fields.

In the project, we have utilised the PeasyCam library to give camera functionality to ease the navigation of the simulation.

2 Classes are created that contains all the functionality of the particles and the FlowField, and have been named accordingly. An empty arraylist is created to store the particles that will be placed within the system. A Particle is spawned from the base plane every frame, randomly within the domains of the bounding box. In this example, the particle is given a random velocity in its inception

For every frame or draw, a particle is drawn and the arrayList keeps on increasing until infinity. In order to optimise the simulation, we have created a bounding box that sets the limits of the position of the particles. If a particle is to move outside the bounding box, it will die and be removed from the ArrayList. In this way, the list does not forever expand.

Next is to start to implement the Flow field or vector field explained earlier. Here we create a class that involves a 2 dimensional array of vectors and assigns them to a number of locations within the base plane we set in the beginning. In order to evenly distribute and position the vectors, we have opted for the use of a grid with a particular resolution respective to the bounding box. If the class is initiated, the particles will be subjected to a series of forces that add steers the movement of the particle. Through this method, we are simulating a particle or matter following a fabricated flow.

Flow is a Project of IaaC, Institute for Advanced Architecture of Catalonia developed at Master in Advanced Architecture in 2016/2017

Student: Jonathan Irawan
Faculty: Angelos Chronis
Course: Introduction to Processing