I created these images using a p5.js. I first rendered them in a GIF, uploaded to Google Drive, and then extracted the individual frames
from the GIF.
The light background gears images were generated in p5.js using this sketch.
The dark background gears images were generated in p5.js using this sketch.