Static
addAdds a gear shape set of edges to the given Polygon. The shape of a tooth is determined as follows. A tooth has 4 edges, which we call: up-slope, out-edge, down-slope, and in-edge.
___ / \ / \___
Let the horizontal span be 100%, then each of the 4 tooth edges has a percentage. For example in the above diagram, the percentages are roughly 25% each. The percentages for the out-edge and in-edge are supplied as parameters. The remainder is split evenly between the up-slope and down-slope.
the Polygon to add the gear to
the inside radius of the gear
the depth (or length) of the teeth
number of teeth
the percentage of tooth that is extended (the out-edge)
the percentage of tooth that is not extended (the in-edge)
adds to this array the starting edge of the gear
Static
makeGenerated using TypeDoc
Utility methods for making toothed gears, and setting forces on them.
TO DO* add a DisplayObject for the turning force which is a big obvious arrow