Monday, March 8, 2010

Mechanical Gears

As a mechanical engineer, I must have some fetish for gears. And I do.
I wrote up a simple example on how simplistic gears can be drawn in actionscript code and posted it on wonderfl. You can check it out here.
The basic idea is to iterate in a loop around the points in a polar manner and provide values for the distance from the center. Coupled with some array data storing for a single gear tooth, and some sin/cos mapping from polar coordinates into cartesian ones, we drew a gear.

Draw two gears, give them compliant tooth to radius ratios and we simply get two meshing gears (if placed at the correct distance).
This example shows the reason why the gears are shaped a little beveled into the inside; The ones I drew are not beveled and if you look closely, they do have an intersection area that would generate a lot of wear, tear, and clicking (if not roaring) noises in a real life situation. Granted there are many standards into creating gears; none of which I'll explore in this blog.

No comments:

Post a Comment