Flowfields
This weekend, I came across a video about generating art in the form of flow fields. You might have seen such art before; it’s intriguing to me how math functions can be used to make particles move on a canvas in a certain way, charting out a beautiful pattern on the screen. This video was posted by a channel called Low Byte Productions, I had a lot of fun playing around with it.
Here’s how a flowfield looks like
I know, right, it’s beautiful! The concept behind them is very straightforward; imagine you have an empty canvas and you throw a bunch of iron filings on it. If you place a magnet underneath, the particles will shuffle around to represent the magnetic field. However, in this case, the magnetic fields are these math functions that represent different sine and cosine waves, and the particles move around trying to chart out the path laid by them.
The video goes into depth on how it comes together in code, I plugged in different sine functions to generate these variations
You can generate your own art piece here: thatsKevinJain/flowfields