Simple Gear System
A simple example of gear-like rotations. Drag to move; Shift-drag to rotate. Set motor to signed degrees per frame, or false to disable it. Set internal to true for teeth on the inner rim instead of the outer rim. The first manually rotated point drives its touching group before any motor. Register a Line with addRack(line) to connect tangent wheels; passive:false locks the connected chain when the rack speed is zero. Set line.rim to -1 or 1 for the negative/positive side from a to b; internal wheels use the opposite side. 0 (the default) engages both sides. line.speed is rack tooth travel per gearbox step. Internal wheels use their inward-facing teeth when meshing with a rack. Set gearBox.recordConflicts = true to flag points with incompatible inputs. TouchCache caches current wheel and rack contacts; attach one with gearBox.setTouchCache(cache). Without it, the gearbox uses live contact checks.
Meta Data
| title | Simple Gear System |
| imports | () |
| files | ('head', '../point_src/extras.js', '../point_src/math.js', '../point_src/point-content.js', 'point', 'stage', 'dragging', 'pointlist', 'mouse', 'stroke', '../point_src/split.js', '../point_src/curve-extras.js', '../point_src/stage-clock.js', '../point_src/touching.js', '../point_src/protractor.js', '../point_src/windings.js') |
| unused_keys | () |
| unknown_keys | ('categories', 'src_dir') |
| categories | ['gears'] |
| src_dir | ['../point_src/'] |
| filepath_exists | True |
| path | gears-v2 |
| filepath | gears-v2.js |
| clean_files | ('../point_src/core/head.js', '../point_src/extras.js', '../point_src/math.js', '../point_src/compass.js', '../point_src/center.js', '../point_src/point-content.js', '../point_src/pointpen.js', '../point_src/pointdraw.js', '../point_src/relative-xy.js', '../point_src/pointcast.js', '../point_src/point.js', '../point_src/stage-hooks.js', '../point_src/stage-resize.js', '../point_src/functions/resolve.js', '../point_src/stage.js', '../point_src/functions/clamp.js', '../point_src/distances.js', '../point_src/protractor.js', '../point_src/text/beta.js', '../point_src/dragging.js', '../point_src/pointlistdraw.js', '../point_src/pointlistgradient.js', '../point_src/pointlistshape.js', '../point_src/pointlistgenerator.js', '../point_src/unpack.js', '../point_src/pointlist.js', '../point_src/pointlistpen.js', '../point_src/events.js', '../point_src/automouse.js', '../point_src/setunset.js', '../point_src/stroke.js', '../point_src/split.js', '../point_src/curve-extras.js', '../point_src/stage-clock.js', '../point_src/touching.js', '../point_src/windings.js') |