The Vector Field is drawn on the screen to better illustrate how it works. It can be disabled using the
Show Field, which will generate a much more pleasing visualization. The
Wrap Noise checkbox
control if the vector is symmetrical along the axes or not. Having it symmetrical makes it more well
behaved overall, where the flow connects across the borders. This makes possible for a particle that
leaves the screen on the right, to continue its journey when it appears on the right. Now, if
this option is turned off, the field on the left may be pointing in the opposite direction that
the particle came from, possibly in a way that it will get stuck in the borders.
The slider that shows
500 Particles is auto explanatory, it shows the number of active particles.
Another control is the
Noise Level slider. This one control how noisy the vector field is. The smaller
this value is, the straighter the trajectory will be. On the other hand, a high value makes the
field very noisy which will make the particles to behave very errantly. Finally. the
determines how fast the field changes in function of time. Have it set to 0 and the flow will be static.
If this is set to its maximum value then the particles will switch its direction very often, even if
the field is not noisy.
An interesting aspect that I implemented here is different properties for the particles. The attent reader may have noticed that some particles behave slightly different than other. With the blue and green ones having a more straight trajectory, while the pink and orange ones making more shape turns. This is due to differences in mass between the particles. The lighter ones undergo a more rapid change in velocity while the heavier ones may need a lucky sequence of vectors to make it turn a sharp 90 degrees turn.
just for fun context.
This project also got me willing again to do some creative coding, so expect to see some more around.
Check out the [Dancing room](Dancing Room) for a similar project and the