The color of the dots that follow the cursor are generated using Perlin Noise, and their sizes are normally distributed using p5's randomGaussian() function.
I store the most recent values of the cursor position in an array, and choose not to draw the newest entries to give the sketch a feeling of following the cursor.
The combination of these attributes gives the little snake thing a very natural feel :)