Another exercise in maths and OpenSCAD, as there are others on here. This is a simple library for making involute gears. You can create the base 2D shape, or make some solid gears.
P.S. added a three gear example.
P.S. I have updated with much more comprehensive general purpose gear module allowing herringbone, helix, chamfered, hollow, spoked, with hole, or spindle or nut cut outs, etc, all in one general function. Have fun.
P.S. Customizer now lets you make the multiple gear examples.