After exploring math for a few days, I was able to build a few connected gears. Gears are connected in a tree structure with the central gear as the root. Gears connected to each other move in different directions.
keyboard controls:
[s] - Get an image of 600 x 600 px.
[d] - Get an image of 1200 x 1200 px. (2x magnification)
[f] - Get an image of 1800 x 1800 px. (3x magnification)