I create the sketch above by watching the Matter.js videos on the Coding Train. You can view the sketch here. Matter.js is a Javascript physics library. My plan was to integrate this sketch into a face tracking sketch.
In the sketch above new circles are created when I drag the mouse through a mouseDragged function. In the sketch below I measure the distance between the face track points 57&60. When this distance is greater than 15 I call a function that adds circles and uses a point between these two track points as the initial position f each circle I add. You can take a look at this sketch here.