This is rather simple application of anvaka/streamlines library to Perlin noise.
First, I generate a random angle using this code by Gerard Ferrandez. Then, for every point on the canvas, I assign a vector that points at given angle.
Now we've got a vector field, and we can use anvaka/streamlines to trace its streamlines.
The result is beautiful animation, that changes from one noise to another. You can open it in background, and just watch, or if you like it - right click and save it as image.
Also feel free to [play with code] - it's very short.
git clone https://github.com/anvaka/noisylines
cd noisylines
npm install
npm run build
Now you can open index.html
file and get the animation running locally. If you change index.js
file - you'll need to
manually run npm run build
every time.
MIT