⚙ Gearbox
A little machine shop in your browser. Gears, pulleys, belts, cams and crank-and-rod linkages that actually move — and every speed, lift and stroke on the bench is exactly true.
How it works
Everything here is honest kinematics. When two gears mesh, the small one turns teeth-in ÷ teeth-out times as fast as the big one, and every mesh flips the direction of turn. Put a 12-tooth gear on a 36-tooth gear and it spins exactly three times as fast, the other way. An idler in between restores the direction without changing the ratio. The motor drives one gear; everything its teeth can reach is worked out from there, mesh by mesh.
Gears can also share a shaft. Tick with pinion and the bench places a pair: a big wheel with a small pinion keyed to the same arbor, one plane below its wheel — the way clock movements stack their plates. Gears in different planes never touch, so a wheel can pass over gears it doesn't drive, and trains can climb wheel → pinion → wheel with the ratios multiplying along the way.
Belts reach where teeth can't. Pick a pulley size and click a shaft to key a belt wheel onto it — or click empty bench for a loose pulley shaft — then arm the belt tool and click two pulleys: a strap spans them. The big pulley turns d-small ÷ d-big times as fast as the small one, and both turn the same way: a belt doesn't flip the direction the way meshed teeth do. Belts have no teeth to line up, so a strap can be re-timed anywhere — which is why a loop containing a belt never binds on tooth phase. It still has to agree on direction, though: one belt across the jammed triangle frees it, while a belt hung on a loop with an odd number of meshes fights itself just the same. The bench halts and tells you which.
Loops are worked out too, and they are strict: three gears closed back on themselves can only turn if their teeth line up all the way round. When they don't, the bench refuses to run and shows you the pair that collides — exactly what real gears would do.
Cams turn round motion into up-and-down. Pick a profile — the egg lobe of an engine's camshaft, the twelve-step snail a striking clock reads its hours from, the pinned drum of a music box — and click a shaft to key it on: it turns with its arbor, lobe and all. Arm the follower tool and click the cam wherever you like: the follower points at the cam's centre and rides the profile, lifted exactly as far as the shape under it is tall. The lift readout is not a decoration — the drawn outline and the number are one and the same function of the angle. A lobe sweeps its whole disc, so a cam needs a shaft whose neighbours keep clear of it; one disc per shaft (cam or belt wheel, not both); and a follower only ever reads — nothing it does feeds back into the shaft.
Linkages carry the round motion off into a straight line. Pick a crank size and click a gear: a pin keys onto the wheel's face and swings round with the arbor. Then arm the rod & slider tool, click the pin, and click where the block should sit: a rod joins pin to block, and the block slides in a straight guide bolted to the bench. When the guide lands near the crank's centre it snaps onto the centre line — the classic in-line figure, whose stroke is exactly twice the crank radius. Pull it aside and the guide stays offset: the two strokes stop being mirror images and the return becomes the quick one. The same slider-crank runs both ways in the world — in the engine the piston drives the crank, in the saw the crank drives the blade — but here the motor always turns the crank and the slider rides along, reading its geometry.
The shelf holds finished machines to take apart. The puzzles panel holds seven small challenges that walk the whole bench instead: double a speed, undo a flip with an idler, free a jammed triangle, move a rotation with straps alone, gear a motor down by exactly sixty to one the way a clock does, give the bench its first up-and-down with a cam and a follower, and — the newest — build a two-cylinder engine from two opposed crank pins. Each puzzle checks itself as you build, each one opens when the one before it is solved, and solved puzzles stay solved in your browser.
A bench is also portable. Press share and the whole machine — gears, pinions, pulleys, belts, the motor and its speed — is packed into the link itself. Anyone who opens it builds exactly what you built, straight in their own browser: no account, nothing uploaded, the link simply carries the drawing.
Honest limits: speeds and directions are exact; torque, friction and wear are not modelled, and the teeth are drawn simplified rather than as true involute curves. Belts are ideal: no slip, no stretch, no minimum-wrap check, and a strap is drawn straight between its pulleys — the bench does refuse a belt whose path would rub a part in the same plane. Belt wheels ride in their arbor's plane; a loose pulley shaft sits in the bench's base plane, and a belt can't jump planes. Cams and their followers are radial and ideal: the follower points at the cam's centre, tracks the profile up and down, and only reads it — no offset followers, no springs, nothing feeds back into the shaft; at most four followers to a cam. Linkages are ideal joints: the rod is rigid and weightless, the guide frictionless, and the slider only ever reads its crank — a piston here can't drive the shaft the way a real power stroke does. At most three crank pins to a shaft, one rod to a pin, and the block's whole travel must stay on the plate; the guide may share its arbor's ground (that is the in-line figure), but other same-plane parts must keep clear of the block's path and the rod's sweep. Pinions are drawn on top of their own wheel so you can see them; in a real movement they hide beneath it. Planes move in whole steps, one mesh apart. One motor per bench. Your bench and your puzzle progress save themselves in your browser — nothing is sent anywhere; a share link carries the machine itself, and opening one simply rebuilds it on the spot.