Flow field visualisation on my homepage

· 3 min read

I created a new visualisation for my homepage rotation.

Here’s a demo:

It’s just a basic flow field simulation with particles tracing their paths along the space. I used the p5.js framework. It reacts to mouse movements!

I did a few optimisations to make it smoother, but in the end I had to lower the framerate and tried to make the low frame rate look intentional. Optimisation was important especially for mobile devices.

Some of the optimisations include:

I think moving the whole particle simulation to the GPU would be the real move, but I didn’t want to bother with shaders and WebGL device compatibility for the moment. Maybe later as a learning project. Or maybe I’ll just port this to PixiJS.

The flow field is generated by Perlin noise, and particles are accelerated according to the field, with the usual position, velocity, and friction dampening basic physics simulation.

This is now part of my home page intro section’s selection of visualizations.