Metric Spur Gear Generator

A simple metric spur gear generator in Javascript+Jquery+HTML5 Canvas. Input the gear module, pressure angle and number of teeth to see the resulting gear update live. Gears that would result in zero-area (or less) top lands are given a truncated addendum to maintain a non-degenerate tooth profile. Similarly, tooth profiles that result in a zero (or negative) area bottom land are truncated at tooth sector boundary. Note that gears with this adapted tooth profile may not mesh well!