The curve as an equation

Four bars that add two angles

A rhombus on two links from one pivot points along the bisector of their angle, exactly, because a rhombus has equal sides. Hold its far vertex on a line and it reflects instead. From those two facts come negation, doubling and addition — and every whole-number combination of two angles a compiled machine needs.

Assumes Every curve is a sum of cosines.

A compiled machine has to produce a link at angle mα+nβ+φm\alpha + n\beta + \varphi for every term of the expansion. Two angles go in, whole-number multiples of them come out, and everything in between has to be done with bars.

Two constructions do all of the arithmetic. Both are a rhombus, used two different ways.

The mean, which is a rhombus and nothing else

Take a pivot OO and two links from it of the same length ss, at angles θ1\theta_1 and θ2\theta_2, ending at points AA and BB. Add two more bars of the same length, from AA and from BB, meeting at a point DD.

The four bars form a rhombus OO, AA, DD, BB, and in a rhombus the far vertex is the vector sum of the two sides:

DO=(AO)+(BO).D - O = (A - O) + (B - O).

Both sides have length ss, so their sum lies along the bisector. The direction of ODOD is exactly (θ1+θ2)/2(\theta_1 + \theta_2)/2, and there is nothing approximate in the statement: it follows from two vectors of equal length adding along their bisector, which is the reason a rhombus’s diagonals bisect its angles.

the mean, solvedA rhombus on two links from one pivot. Its far vertex is the vector sum of two equal lengths, so the diagonal bisects the angle between them, for the same reason a rhombus has equal sides. The relation it satisfies is **(θ₁, θ₂) ↦ (θ₁ + θ₂) / 2**, and across a sweep of 41 positions the worst departure from it is 3.0e-15 radians. Every joint here is the output of a Newton–Raphson solve on the bar lengths; nothing is placed by the formula the picture is about.θ₁θ₂the bisector(θ₁, θ₂) ↦ (θ₁ + θ₂) / 2positioned by solving, not by drawing
Fig. 1 The mean gadget, solved. Two links from a pivot and two more closing the rhombus; the heavy line is the diagonal, and the readout is the angle it makes against the closed form.

Two bars, one new joint, no freedom added or taken away: DD has two coordinates and two bar constraints, so the gadget is determinate — given its inputs, its output is fixed.

The one thing to notice about it is what happens at θ1θ2=π\theta_1 - \theta_2 = \pi. The two vectors are opposite, their sum is zero, and DD arrives at the pivot with no direction at all. That is the mean’s singular configuration and it is a real place, not an artefact; the rung on where the machine stops working is about what happens when a machine drives through one.

The four gadgets, against their closed forms. Each construction driven across its own working range and its output compared with the formula it is supposed to satisfy — an angle added, an angle bisected, an angle reflected, a direction carried. The bars are decades above 10⁻¹⁷. None of these relations is fitted or approximated: they hold because a rhombus has four equal sides and a parallelogram has two pairs, and the measurement is here to say that the machinery built on them inherits nothing worse than rounding. Each gadget's range stops short of its own singular configuration, which has its own figure.
Fig. 2 The four constructions against their closed forms, as decades above 10⁻¹⁷. Nothing here is fitted.

The reflector, which is the same rhombus with a rail

Now do something different with the same four bars: instead of taking the diagonal as an output, force it to lie along a given line and read the fourth vertex.

Give the pivot a mirror direction μ\mu — a line through OO, materialised as a point on it — and one input link at θ\theta. Build the rhombus so its far vertex DD lies on that line. Then the other side comes out at

2μθ,2\mu - \theta,

which is the input reflected in the mirror.

the reflector, solvedA rhombus whose far vertex is held on a line through the pivot. One side is the input, the line is the mirror, and the other side comes out reflected in it — which is where negation, doubling and addition all come from. The relation it satisfies is **(μ, θ) ↦ 2μ − θ**, and across a sweep of 41 positions the worst departure from it is 1.3e-13 radians. Every joint here is the output of a Newton–Raphson solve on the bar lengths; nothing is placed by the formula the picture is about.input θ2μ − θon the mirror(μ, θ) ↦ 2μ − θpositioned by solving, not by drawing
Fig. 3 The reflector. The dashed line is the mirror; the far vertex of the rhombus is held on it, and the fourth side comes out reflected. Drag the input and the output goes the other way.

The bookkeeping: DD and BB are new, four unknowns; three bars and one condition holding DD on the line, four equations. Determinate again, and one gadget more expensive than the mean.

the rigid offset, solvedA point carried rigidly on a link, at a fixed angle to it and a fixed fraction of its length — physically a triangular link, and the only one of the four with no second assembly, because a rigid attachment has one place to be and a pair of bars has two. The relation it satisfies is **θ ↦ θ + φ**, and across a sweep of 41 positions the worst departure from it is 2.2e-16 radians. Every joint here is the output of a Newton–Raphson solve on the bar lengths; nothing is placed by the formula the picture is about.input θθ + φθ ↦ θ + φpositioned by solving, not by drawing
Fig. 4 The fourth construction, and the only one with a single placement: a point carried rigidly on a link.

Everything from the reflector

The reflector is a two-input, one-output device and it is enough on its own.

Negation. Reflect the input in the frame direction. 20θ=θ2 \cdot 0 - \theta = -\theta.

Doubling. Reflect the frame direction in the input. 2θ0=2θ2\theta - 0 = 2\theta. The roles of mirror and input swap, and the same four bars that negated now double.

Addition. Take the mean of θ1\theta_1 and θ2\theta_2 with a free rhombus, then reflect the frame direction in that: 2θ1+θ220=θ1+θ22\cdot\frac{\theta_1+\theta_2}{2} - 0 = \theta_1 + \theta_2. Two gadgets, six bars, three new joints, and two angles have been added.

Subtraction is addition and a negation. Multiplication by a whole number is repeated doubling and addition, and which combination is cheapest turns out to depend on the number’s binary expansion rather than on its size.

That is the whole arithmetic. Two constructions, four operations, and every integer combination of two angles reachable from them.

What a singularity does, and what it does not do. The reflector driven straight through the configuration at which its two placements merge — here θ = 0.800, where the rhombus flattens onto its own mirror. Two numbers are plotted. The closure residual is how well the bars are satisfied, and it does not move: 8.3e-14 on both sides. The departure is how far the output is from the angle the gadget is supposed to produce, and it goes from the floor to order one at 0.800. Nothing breaks. The gadget goes on being a perfectly good linkage and stops being the function it was built to be.
Fig. 5 What the algebra predicts, driven: at the configuration where two placements merge, the closure residual does not move and the departure goes to order one.

The reflector’s two solutions, written out

The reflector is the one gadget whose branch structure can be written down in closed form, and doing so explains both of its singularities and most of what goes wrong later.

Put the pivot at the origin, the mirror along μ\mu, the input link at θ\theta with length ss. The far vertex DD has to be on the mirror, so D=deiμD = d\,e^{i\mu} for some scalar dd, and it has to be at distance ss from the input’s end. Squaring that condition:

d22dscos(μθ)=0,d^2 - 2ds\cos(\mu - \theta) = 0,

so d=0d = 0 or d=2scos(μθ)d = 2s\cos(\mu - \theta).

The first root is the degenerate one: the whole rhombus collapsed to the pivot. It satisfies both bars and it is not a configuration anything can pass through, since the two remaining bars would then be free to point anywhere. The second is the working one, and its length varies with the angle between the mirror and the input.

Two consequences fall straight out.

At μθ=±π/2\mu - \theta = \pm\pi/2 the working root arrives at zero and merges with the degenerate one. That is one of the reflector’s singularities and the rhombus is closed up on itself there.

At μ=θ\mu = \theta the vertex is at its furthest, d=2sd = 2s, and the rhombus is a straight line: the input, the vertex and the output all along the mirror. The two placements of the output merge there, because the two circles that place it are tangent. That is the other singularity, and it is the one a compiled machine actually hits, because the doubler reflects the frame direction in α\alpha and α\alpha passes through zero on any decent working arc.

That second one is worth naming precisely, because a reader watching a machine leave its curve later will want to know what it did. It did not break a bar or fail to converge. It reached a configuration where two solutions of a quadratic coincided, and came out on the other one.

The vertex changes sign, and that is not a failure. For μθ|\mu - \theta| greater than a quarter turn, dd is negative and the vertex sits on the far ray of the mirror line. The gadget goes on working perfectly — a mirror is a line, and reflecting in a line does not care which way along it anything points. Any instrument that compared the vertex’s direction against the mirror’s would report a departure of π\pi at every such crossing and would be wrong about a machine that was right, which is why the vertices whose meaning is a line are compared modulo π\pi and the output links, which have a direction, are not.

How much of a compiled machine is computing anything. Each machine's bars split two ways: the ones that build an angle — reflectors, means, rigid offsets, the arm — and the ones that carry a direction from where it was computed to where it is needed. On the smallest machines the arithmetic is nearly all of it. By the quintic the carrying is 80 per cent, and it goes on rising, because the arithmetic grows with the number of terms and the carrying grows with the number of pairs of them. That is the answer to why a universality construction is enormous, and it is not about the algebra being hard.
Fig. 6 The asymmetry the free phase creates: a machine’s size depends on the integers in its expansion and not at all on the real numbers.

The phase, which is free

The expansion’s third number is a phase, and it needs no gadget at all.

A point attached rigidly to a link — at a fixed angle to it and a fixed fraction of its length — is at the link’s direction plus a constant, at a length the attachment chooses. Physically that is a triangular link: one rigid piece with three points on it. Given a link from the pivot at angle θ\theta and length ss, one such attachment produces a point at angle θ+φ\theta + \varphi and radius RR, for any φ\varphi and any RR.

So a term’s phase and its amplitude — two of its three numbers — cost one triangular link between them, and the frequencies cost everything else. That asymmetry is worth carrying: a compiled machine’s size is governed entirely by the integers in the expansion, and not at all by the real numbers.

The offset has one more property that separates it from the other three gadgets, and it matters later. A rigid attachment has one placement. Two bars meeting at a joint have two — the two intersections of two circles — and every gadget built from bars therefore has a second assembly. The offset does not, because a rigid body attached to a rigid body is where it is.

What the four are worth, measured

Each gadget was built as a mechanism on its own bench, driven across a sweep, and its output compared against the closed form it is supposed to satisfy.

Rigid offset 2.2×10162.2\times10^{-16}, mean 2.7×10132.7\times10^{-13}, reflector 1.6×10131.6\times10^{-13}, translator 1.7×10131.7\times10^{-13}. All four at the floor.

Two things about that measurement are load-bearing.

Each configuration is solved from the previous one, not from the closed form. Seeding a Newton solve with the answer and then observing that it agrees with the answer is a check that tested nothing, and this site has made that mistake and recorded it: the expansion phase found a solver seeded from a closed form agreeing with it having never run an iteration. The gadget sweeps march, so the solver does work at every step and the agreement means something.

What is being compared is not the closure residual. The closure residual says the bars are the lengths they should be, and it is at the floor whether or not the gadget is producing the right angle — which is the whole subject of the branch rung. The number quoted here is the departure: the output angle minus the angle the closed form asks for. It is a different quantity and it is the one that can fail.

The ranges are chosen, and the choice is stated

Each of those sweeps stops short of somewhere, and pretending otherwise would make the measurement worthless.

The reflector has three singular configurations in a turn. When the mirror lies along the input the rhombus flattens onto a line and the two placements of its far vertex merge. When the mirror is perpendicular to the input the far vertex arrives at the pivot and the rhombus closes up on itself; there are two such angles. With the bench’s mirror at 0.80.8 radians those sit at 0.80.8 and at 0.8±π/20.8 \pm \pi/2, and the sweep runs between the nearest pair.

The translator’s is one condition: the direction being carried lies along the line between the two points it is being carried between, and the parallelogram has no area. The bench puts its target straight up the page so that angle is a quarter turn away, outside the sweep.

Those are not evasions and they are not hidden. A sweep that crossed a singularity would be measuring the branch change rather than the gadget, and the branch change gets its own figure two rungs on, where the reflector is driven straight through and what happens is recorded. Two measurements, one on each side of a line, is a more informative arrangement than one measurement that averages over it.

the translator, solvedA parallelogram, carrying a direction from one point to another. It works only because the two points are a fixed distance apart, and that condition is the whole cost structure of a compiled machine. The relation it satisfies is **θ at P ↦ θ at R**, and across a sweep of 41 positions the worst departure from it is 5.6e-16 radians. Every joint here is the output of a Newton–Raphson solve on the bar lengths; nothing is placed by the formula the picture is about.θ hereθ thereθ at P ↦ θ at Rpositioned by solving, not by drawing
Fig. 7 The piece that brings an angle to where a rhombus can reach it: a parallelogram, carrying a direction between two points a fixed distance apart.

Two inputs at one pivot, which is the hidden requirement

There is a condition on the mean that is easy to miss and governs the whole architecture: its two inputs must be links from the same point.

A rhombus relates the directions of two links that share a vertex. It cannot relate a link at one place to a link at another, because there is no rhombus with a vertex in two places. So every angle a compiled machine wants to combine has to be brought to a common pivot first, and that is a job for the translator rather than for the arithmetic.

The architecture that follows is the one Kempe chose and it is the only one available: do all the arithmetic at one fixed pivot, where every angle is a link from a single point and any two of them can meet in a rhombus. Copying between fixed pivots is free — their separation is a constant, so the parallelogram is always available — so the arithmetic could be spread over several ground points if that were convenient. Copying to anything that moves is not free, and the whole of the summing chain is downstream of that.

It also explains a piece of the compiler’s shape that would otherwise look arbitrary: the arm’s second angle is dragged back to the pivot with a parallelogram before any arithmetic starts. The alternative — doing the arithmetic at the arm’s elbow, which is where β\beta naturally lives — fails immediately, because the elbow moves relative to everything except the pivot and its own tip.

Why a rhombus and not something cleverer

It is fair to ask whether there is a smaller angle-adder, and the answer illuminates why this particular construction is the one built.

There are certainly other mechanisms with angle relations. An antiparallelogram — four bars with equal opposite sides, crossed — has a beautiful angle relation between its input and output, and it is not the one needed: sweeping one gives tan(θ/2)tan(ψ/2)=(ab)/(a+b)\tan(\theta/2)\tan(\psi/2) = (a-b)/(a+b), a constant product of half-angle tangents rather than a linear relation. That is the rolling-ellipse relation, and it is exact and useless here, because what the expansion asks for is mα+nβm\alpha + n\beta and nothing else.

A gear pair multiplies an angle exactly, and gears are outside what this construction is allowed. The whole interest of a universality result for linkages is that it uses only bars and pins — the lower pairs — and a machine that needed gears would be answering a different question.

The rhombus is what is left, and it is enough. Its virtue is that the relation it enforces is linear in the angles, which no other four-bar’s is, and linearity in the angles is exactly what a trigonometric expansion with integer frequencies requires.

Determinate, and what that costs

All four gadgets have the same bookkeeping property: each adds exactly as many equations as it adds unknowns. A mean is two coordinates and two bars. A reflector is four coordinates, three bars and a rail. An offset is two coordinates and one rigid attachment, which is two equations. A translator is two coordinates and two bars.

So a machine made of gadgets has whatever mobility its arm had, less whatever the closing constraint takes. The arm has two freedoms, the equation takes one, and the machine has one — however many gadgets are hung off it. That is not obvious in advance and it is the reason the construction scales at all: a linkage assembled by adding determinate pieces stays a mechanism rather than becoming a structure.

It is also the reason Grübler’s count is exactly right about an unbraced compiled machine, which is a mild surprise given how often it is wrong about the interesting ones. Every gadget is a dyad or a rigid attachment, none of them is overconstrained, and the count has nothing to miss. That changes, deliberately, when the braces arrive.

Where the arithmetic stops being the problem

Six bars add two angles. Three bars and a rail double one. A triangular link supplies a phase and a length. Multiplying by nn costs about log2n\log_2 n reflectors.

Add all of that up for a curve of degree five and the arithmetic comes to a few dozen bars. The compiled machine for a general quintic has four hundred and thirteen.

The difference is not arithmetic. It is that every angle produced at the pivot has to be carried to where the summing chain needs it, and carrying is the next rung — one parallelogram per hop, one hop per position along the chain, and a chain as long as the number of terms.

What it costs to multiply an angle. Multiplying an angle by n is done by doubling and adding — 2k is one reflector applied to k, and 2k+1 is one addition of k's result and the original — so the cost follows the binary expansion of n and not n itself. Eight costs three doublings; seven costs six gadgets, twice as much, for a smaller number. The other line is what a chain of n−1 additions would cost. The difference matters because the highest multiple a curve of degree d needs is d, so the arithmetic in a compiled machine grows like d log d while the carrying grows like d⁴ — which is why the arithmetic is not what makes these machines large.
Fig. 8 What the gadget set costs when it is chained: doubling and adding against a chain of additions, for each multiple of an angle.

The place these gadgets came from

A note on attribution, because the construction here is not the historical one and it would be dishonest to let the resemblance stand unremarked.

Kempe’s 1876 paper describes an additor, a reversor, a multiplicator and a translator, and gives constructions for each built from contra-parallelograms and parallelograms. The four operations are his and the architecture — compute the angles at a fixed pivot, sum the terms with a chain, close the chain on a line — is his.

The gadgets built here are not. They are a rhombus used two ways, chosen because they are the simplest pieces this site’s solver can position and this site’s gates can check, and because the relation each enforces can be stated in one line and compared against a measurement. Every bar count in this field is a count of these machines. Where the historical figures are mentioned they are described as such, and the comparison is qualitative: Kempe’s own construction for a modest curve runs to numbers of parts that were quoted in the millions and were later brought down a great deal by others, and none of that arithmetic is reproduced here.

What is shared is the result and the shape of the argument. What is measured is this construction, on this site’s solver, and the numbers belong to it.

What this makes readable

Essays that name this one as a prerequisite.

About the same objects

Not linked from either essay — found by the objects both name.

What links here

Essays that link to this one from their own argument.

The objects this essay names

Each one links to every other essay that touches it.

Angle bisectorAssembly branchClosed formExact mechanismKinematic pairReflectionRhombus