Machine Kinematics

About

What this site is, why every mechanism here is solved before it is drawn, and the difference between kinematics and everything else a machine has to survive.

This is a growing collection of illustrated essays about linkages, gears and cams. Each takes a single idea and draws it until the argument is visible — and every position in every figure is the output of a solve rather than a placement.

Nothing here is drawn

A mechanism diagram is normally made by placing the links where they look right. That method is sound when the illustrator is careful, and it has a failure mode with no symptoms: a linkage can be drawn in a configuration it cannot physically reach, and nothing about the picture says so. Animated mechanism diagrams pass through such configurations routinely, because the usual way to animate one is to interpolate the output smoothly between its extremes — which is not what the mechanism does.

Sketch a four-bar that way and the coupler has to change length by about 12% as the crank goes round. Every individual frame is a perfectly plausible picture of a linkage.

So on this site a mechanism is a set of joints and a set of constraints between them, and a configuration is found by driving the constraint residual to zero with Newton–Raphson against an analytic Jacobian. Converged residuals sit at the 10⁻¹⁶ level, against a tolerance of 10⁻⁹, and a linkage that cannot close reaches 3.6 — so the check has nine orders of margin on one side and seven on the other, both measured rather than asserted. If a solve does not converge, the configuration does not exist and the figure fails to build.

The Jacobian is not only a solver detail

Three things fall out of solving rather than placing, and together they are most of what distinguishes this site from an illustrated one.

Mobility gets a second, independent route. Grübler's criterion counts links and joints and knows nothing about the dimensions. The rank of the constraint Jacobian measures the dimensions and knows nothing about the topology. They agree for almost every mechanism, and where they disagree the formula is the one that is wrong — a parallelogram with a redundant third bar is declared a structure with zero degrees of freedom, and it moves. Mechanisms of exactly that kind carry drafting machines, anglepoise lamps and locomotive coupling rods.

Velocities come free, and are checkable. Differentiating the constraints gives a linear system with the same Jacobian, so a full velocity field costs one back-substitution. It can then be checked against a finite difference of two nearby positions, which is a genuinely independent route — and it is the check that catches a sign error, because a sign error still converges and still draws a plausible mechanism. It caught one here, reporting a relative error of exactly 2, which is the signature of a reversal rather than an inaccuracy.

A singularity is visible rather than inferred. Dead centres, toggles and branch points are exactly where the Jacobian loses rank. They are not edge cases on this site; they are where mechanical advantage goes to infinity and where machines jam, and those turn out to be different configurations.

Two routes wherever there are two

The habit is applied everywhere it fits, because agreement between two independent calculations is the only evidence either one is right:

The assertions have to reject, and the gate proves it

Assertions that accept everything would pass every other check while making the whole premise void. So a site-local gate breaks things deliberately and requires the machinery to notice: a linkage whose links cannot close must fail to solve, a triangulated frame must measure zero degrees of freedom, a tooth flank built from circular arcs must fail the involute test, and a cam programme whose rises do not cancel its returns must be refused.

That last one was not a hypothetical. The first version of the cam library had no such check and its test programmes were rise-plus-dwell, which describes a follower that teleports once per revolution. Four assertions failed at once and all four were reporting the same artefact — the step at the seam rather than anything about the motion law.

Turning the crank is the argument

A mechanism is not a state. It is a relation between an input and an output, and the thing being explained is how one becomes the other. So the figures that have an input are draggable, and this is not decoration: moving the crank is the explanation.

Every frame on a slider is produced at build time by the same generator that drew the static figure, evaluated at that input angle. So every assertion the generator makes — loop closure above all — has already been checked at every position the reader can reach, and a configuration the mechanism cannot assemble cannot appear. The static figure carries the whole argument on its own, for a reader with JavaScript off, for a printer and for a crawler.

Where the models stop

This is kinematics, not dynamics. Positions, velocities, accelerations and the geometry of force transmission are all here. Mass, inertia, friction, backlash, clearance, elasticity and wear are not. A transmission angle says how much of an applied force turns into useful output torque; it does not say whether the pin will survive. No figure on this site is a strength calculation and no essay treats one as such.

Everything is planar. Spatial mechanisms — the universal joint, the Sarrus linkage, Bennett's four-bar, a robot arm — obey the same principles with a mobility formula that counts differently, and none of them is here yet.

Every joint is ideal. A pin is a point, a slide is a line, and neither has clearance. Real backlash is what makes a gear train rattle and a linkage lose position, and it is a first-order effect in practice that appears nowhere in these figures.

The proportions are conventions. A gear's addendum is one module and its dedendum 1.25, because that is the standard; a cam's design limits — 30° pressure angle, 40° transmission angle — are rules of thumb with reasons rather than theorems. Where a number is a convention this site says so, because every result downstream depends on it.

On being wrong

Corrections are welcome and will be made. A mechanism drawn in an impossible configuration looks exactly like one drawn in a possible configuration, which is the entire argument for computing the configuration.