The gear face is an involute curve. Imagine a string rolled on a drum.
if the string is a set length then the arc the end of the string makes as it comes off the drum is an involute curve. Not too hard to draw and create a good approximation. the number of teeth and thickness of tooth also affects this, but these are approximate gears and work well in low to medium loads for 3d printed parts. if you are engineering high load gearing then there are more considerations.
Thanks mark