Interactive Paint Brush in P5

In this exercise, I created an interactive paint brush using P5.js. I've been curious about how watercolor brushes are created for painting software such as ProCreate and Photoshop. I decided to do some research on how the rendering technique worked and set off to create my own version of a watercolor brush.

Inspiration and code logic was taken from the following videos:

During my experiments, I also saw that maintaining the edges of the shape of the brush gave it another effect. I then proceeded to try out different ways in which the edges could pop more in order to generate another brush based on the traditional water color rendering techniques.

Demo video