The curve as an equation

A demand that is an equation

Every field on this site is handed its demand geometrically — three positions, a sampled path, a ratio at each angle — and hands back a mechanism that is right at those places and approximately right between them. This one is handed a polynomial, and the mechanism that comes back satisfies it everywhere it moves.

Assumes The problem the other way round.

Here is a request nothing on this site has been able to answer.

A curve is wanted: x4+2x2y2+y41.2x2+1.2y2=0x^4 + 2x^2y^2 + y^4 - 1.2x^2 + 1.2y^2 = 0. Not a linkage whose coupler point passes near it. Not a four-bar fitted at five places along it. That curve, exactly, at every position the mechanism has.

The synthesis field has been running the design problem backwards for six phases and it cannot take this. Burmester’s constructions take positions — three of them, or four, or five — and return the finitely many linkages that hit those positions exactly. Approximate synthesis takes a sampled path and an objective function and returns a linkage that minimises it. Both are handed a finite list of things to be right about, and both are silent about everywhere else.

That is not a shortcoming of the methods. It is what their input is. A specification made of samples cannot ask for anything between the samples, and a mechanism has no reason to oblige.

This field’s input is different in kind.

Three things change at once

The specification is symbolic. A polynomial p(x,y)p(x, y) is not a sample of a curve; it is the curve — the whole set where it vanishes, at once, with no discretisation anywhere. There are no precision points, because every point is one.

The mechanism is compiled rather than searched for. There is no optimiser, no starting guess, no root count and no continuation. The polynomial is rewritten as a sum of cosines, each cosine becomes a link, and the sum being zero is the linkage closing. That is a compiler in the ordinary sense: a mechanical translation from one language into another, with no choices made along the way that a search would have had to make.

The answer is exact, and what it costs is size. Every other field on this site trades exactness against something. A cam profile buys the motion that was asked for and pays in accelerations nobody asked for. A gear tooth buys a constant ratio and pays in a contact point that slides. This field does not trade: the traced point satisfies pp to the floor of double arithmetic. It pays in bars, and the payment is enormous.

What the machine draws, against where the polynomial vanishes. Two objects, found two ways. The thin line is the set where x^4 + 2x^2y^2 + y^4 − 1.2x^2 + 1.2y^2 is zero, walked over a grid with no mechanism involved. The marks are where the compiled machine's tracing point went, one per converged solve, over the 147 positions of its working arc. The machine's constraint set never mentions the polynomial, so evaluating it at each traced point is an independent check: the worst value over the whole arc is 3.7e-13. The arc is 1.30 radians of the driving angle and not the whole turn, and past that arc it draws something else.
Fig. 1 The thin line is the set where the lemniscate’s polynomial is zero, found by walking a grid with no mechanism involved. The marks are where a compiled linkage’s tracing point went, one per converged solve. The machine’s constraint set never mentions the polynomial, so evaluating it at each traced point is an independent check.

What “exactly” is worth, given what this site already knows

The word exact has appeared on this site before and it has been earned before. Peaucellier’s cell draws a straight line to 101610^{-16} of its span while Watt’s linkage is out by nine per cent of its stroke and Chebyshev’s by twelve. Sarrus’s linkage does it in space. Both are exact because an exact algebraic relation holds among their lengths, not because somebody tuned them well.

What is new here is not exactness. It is generality. Peaucellier’s cell is exact about one curve, and there is no procedure in it: the inversor was found, and the finding took the nineteenth century a long time and was reported as news. This field’s claim is that the finding is not needed — that for any algebraic curve there is a linkage drawing it exactly, and that the linkage can be written down from the polynomial by a procedure with no insight in it at all.

That claim is a theorem, and it is not proved here. What is done here is to build the machine for a stated polynomial, position every joint by a converged solve, and measure how far the traced point is from the curve.

How the term count grows with the degree. A dense polynomial of each degree — every monomial present, nothing cancelling — expanded, and its terms counted. The answer is exactly d² + d at every degree tried: two, six, twelve, twenty, thirty, forty-two. That is the honest worst case, and the catalogue's own curves all sit below it because each of them cancels a different amount. The number matters because the summing chain costs a translator for every pair of terms, so a machine's size goes as the square of this and therefore as the fourth power of the degree.
Fig. 2 The worst case for the demand this field takes: a dense polynomial of degree d expands to exactly d² + d cosine terms, and the machine’s size follows the square of that.

The arm that turns two angles into a point

Everything rests on one arrangement, and it is the smallest one that could work.

Put a two-link arm at a fixed pivot, both links of length \ell, at angles α\alpha and β\beta from the frame. The tip is at

x=(cosα+cosβ),y=(sinα+sinβ).x = \ell(\cos\alpha + \cos\beta), \qquad y = \ell(\sin\alpha + \sin\beta).

Two angles, two coordinates, and the tip covers the disc of radius 22\ell. That is a mechanism with two degrees of freedom and no constraint on it yet — the serial field’s two-link arm, which is the first mechanism this collection ever drew.

Now put those expressions into the polynomial. What comes out is a function of α\alpha and β\beta, and the whole of the next rung is that this function has a very particular shape: it is a constant plus a finite sum of terms Acos(mα+nβ+φ)A\cos(m\alpha + n\beta + \varphi) with whole-number mm and nn. The curve’s equation becomes a statement about angles, and a statement about angles is something bars can be made to enforce.

Two routes to the same number, along one sweep. The polynomial x^4 + 2x^2y^2 + y^4 − 1.2x^2 + 1.2y^2 evaluated at the tip of the arm as the second angle goes right round, by two routes that share nothing: once by putting the tip's coordinates into the polynomial, and once by adding up 5 cosines of whole-number combinations of the two angles. The two curves are drawn on top of each other and the worst gap between them is 8.9e-15. Where the line crosses zero is where the machine may stand: 2 crossings at this α, which is how many assemblies the compiled machine has at this driving angle.
Fig. 3 The polynomial evaluated at the arm’s tip as the second angle goes right round, by two routes that share nothing: once by putting the tip’s coordinates into the polynomial, and once by adding up five cosines. The crossings are where the machine may stand.

Each crossing in that figure is an assembly. The curve equation is one condition on two angles, so it leaves one freedom, and a mechanism enforcing it is a one-degree-of-freedom linkage whose tracing point runs along the curve. That is the object this field is about, and everything else is how to enforce the condition with bars.

What is being claimed, precisely

It is worth being exact about the claim before the machinery arrives, because the machinery is large and it is easy to lose track of what it is for.

What each curve costs, in cosines. Every polynomial in the two arm angles is a constant plus a sum of terms A cos(mα + nβ + φ) with whole-number m and n, and the number of those terms is what a machine has to build. The count is not the degree and not the monomial count: a circle costs one term, a general line two, and a lemniscate — degree four — costs five, fewer than the cubic above it, because its symmetry cancels frequency pairs the cubic keeps. Each row's expansion was checked against a direct evaluation of its own polynomial at random angles, worst disagreement 1.8e-14.
Fig. 4 What the demand actually is, curve by curve: a polynomial, and the number of cosine terms its expansion leaves. Everything the compiler builds is one gadget per term, so this column is the size of the demand before any machine exists.

The claim is not that a linkage can be found for any curve by searching. Searching is what the synthesis field does and it is a different activity with different failure modes.

The claim is not that a compiled linkage is a good way to draw a curve. It is, on the evidence assembled over the next twelve rungs, an extraordinarily bad way: the machine for a general quintic has four hundred and thirteen bars and works over a tenth of a radian of its driving angle.

The claim is that the curve is drawn exactly, that the construction is mechanical, and that both of those can be measured rather than argued. The measurement is the same one this site makes everywhere: a solve reports its own residual, and a second route that shares no inputs with the first is used to check the answer.

Here the second route is unusually clean. The compiled machine’s constraint set is a list of bar lengths, rigid attachments and one line constraint. Nothing in it mentions the polynomial. So evaluating pp at the solved tracing point is a completely independent question, and the answer over a whole working arc is 101410^{-14} or better on every curve in this field’s catalogue.

The expansion against the polynomial it came from. For each curve, three hundred random pairs of arm angles; at each, the polynomial evaluated directly at the arm's tip and the cosine sum evaluated from the expansion, and the worst disagreement between them. The bars are decades above 10⁻¹⁶. Every one of them is at the floor of double arithmetic, which is what an identity looks like when it is measured rather than asserted: nothing here is fitted, nothing is approximated, and the two routes share no code beyond the arithmetic of the machine they run on.
Fig. 5 The independent route, run on the whole catalogue: each expansion evaluated back against the polynomial it came from. The worst disagreement on any curve is at the bottom of the scale, which is what makes the exactness a measurement rather than a claim.
The machine compiled from a rectangular hyperbola. xy − 0.5, compiled: 20 bars and 20 joints, painted by what each part is for. The two-link arm at the pivot carries the tracing point; the reflectors and means build each term's angle; the rigid offsets fix the constant φₖ and the amplitude; the translators carry those directions out along the summing chain, whose last vertex is held on a line. That last constraint is the equation. Every joint drawn is the output of a Newton–Raphson solve on 36 equations, converged to 4.2e-16, and the polynomial at the tracing point is 2.2e-16.
Fig. 6 A compiled machine, painted by what each part is for: the arm, the reflectors and means that build each term’s angle, the offsets that set each term’s phase angle and its length, and the translators carrying those directions out along the chain.

Why the count is the interesting column

Look down that table and the pattern is not the one a reader arriving from the synthesis field expects.

A line costs five bars. A circle costs eleven — more than a line, and vastly more than the one bar a crank needs, which is the answer everybody already knows. A rectangular hyperbola costs twenty. A lemniscate, degree four, costs fifty; a general cubic, degree three, costs a hundred and one. A quintic costs four hundred and thirteen.

Two things are already visible and both get a rung of their own.

The cost is not the degree. The lemniscate is a higher-degree curve than the cubic and costs half as much, because its symmetry cancels terms the cubic keeps. What a curve costs is how many distinct frequency pairs (m,n)(m, n) survive in its expansion, and that is a fact about the polynomial’s coefficients rather than about its degree.

The compiler is bad at easy cases. It returns eleven bars for a circle. It has no way to notice that the circle’s single term makes the whole summing apparatus unnecessary, because it has no way to notice anything: a compiler that recognised special cases would be a search, and the point of the construction is that there is nothing to find.

That second observation is worth holding onto, because it is the honest shape of every universality result. A procedure that works for everything works for the easy cases the same way it works for the hard ones, which is to say badly.

The two ways it goes wrong, and they are different objects

A compiled machine draws its curve on an arc and not for ever, and it has assemblies that draw something else. Both are ahead, both are measured, and it is worth naming them now because they are the two halves of this field’s honesty.

A gadget has a singular configuration. Drive the machine far enough and one of its rhombi flattens, its two placements merge, and the continuation may come out on the other one. Nothing breaks — every bar is the length it was, the closure residual stays at 101610^{-16} — and the machine goes on drawing a different curve. That is the subject of Where the machine stops being the function, and it is why every arc in the cost table is a fraction of a turn.

A parallelogram has a second assembly. The same four bars close as an antiparallelogram, and a direction is then carried wrongly. This is a discrete alternative rather than a singularity, it is the gap in Kempe’s original argument of 1876, and unlike the first it is removable. Sixteen assemblies of the hyperbola’s machine, eight of which close: four put the tracing point on the curve and four put it somewhere else, at a closure residual of 9.6×10159.6\times10^{-15}.

That picture is the reason this field exists as a field rather than as a paragraph in the synthesis one. A mechanism that satisfies every constraint it has and computes the wrong function is not something the site’s other instruments can see. Every gate here asks whether a loop closes; this is a machine whose loops close perfectly.

The frequencies a lemniscate asks for. One mark per term of x^4 + 2x^2y^2 + y^4 − 1.2x^2 + 1.2y^2, placed at the whole numbers (m, n) that say how many times the two arm angles enter it, and sized by the amplitude — which is the length of the link the machine builds for it. Only one of each conjugate pair is drawn, because (m, n) and (−m, −n) are the same cosine. The empty places are the content: a curve's cost is how many of these lattice points its coefficients fail to cancel, and every one that survives is a chain of reflectors long enough to multiply an angle by m and by n.
Fig. 7 A polynomial has no lengths in it. What it does have is a set of whole-number frequency pairs, and those are what a bar can be made to hold.

An equation is a stranger demand than it looks

There is a reason no earlier field on this site could have taken this input, and it is worth spelling out because it is not obvious.

Every mechanism this site has drawn is specified by numbers with units of length. A four-bar arrives as four bar lengths. A cam arrives as a lift and a set of spans. A gear pair arrives as a module and two tooth counts. Even the fields whose object is unusual keep that character: the topology field’s census produces chains with no lengths at all, and the first thing done with one is to give it lengths.

A polynomial has no lengths in it. Its coefficients are not distances, they do not scale like distances, and there is no operation that turns them into a set of bars. Between the specification and the mechanism there is a translation, and the translation is the field.

That is why the two-link arm matters so much. It is the piece that turns a statement about coordinates into a statement about angles, and a statement about angles is exactly the kind of thing a bar can enforce. A bar holds a distance; a rhombus holds an angle relation; and the whole of the next four rungs is the discovery that a small vocabulary of angle relations — bisect, reflect, carry — is enough to express any whole-number combination of two angles.

The arithmetic that makes this work is a hundred and fifty years old and the mechanisms are older. What is new here is that both halves are computed and both halves are checked: the algebra by comparing two evaluations that share no code, and the mechanism by solving every position and asking a question its constraints cannot answer.

The instrument, stated before it is used

Three numbers are read off every machine in this field, and confusing them is the way to get every later rung wrong.

The closure residual is how well the bars are satisfied — the norm of the constraint equations at the converged position. It is the number every field on this site quotes, and it sits at 101410^{-14} everywhere here, including on the assemblies that draw the wrong curve.

The curve residual is the polynomial evaluated at the tracing point. It is the specification, checked, and it is the number that separates a machine doing its job from a machine doing something else.

The departure is how far a gadget’s output angle is from the angle its specification asks for, given the machine’s own α\alpha and β\beta. It is the finest of the three: it names which part of the machine has gone wrong and at which driving angle, where the curve residual only says that something has.

The three are independent, and the field’s central result is a statement about their independence: the first cannot see what the other two can. A tolerance on the closure — any tolerance, at any level — passes every assembly in the census, right and wrong alike.

What degree a coupler curve actually is. A four-bar's coupler point traced at 602 solved positions, then asked which polynomials vanish on those points. For each degree the design matrix's smallest singular direction is taken and its worst residual plotted. Degrees four and five leave nothing near zero; degree six drops by ten decades and degree seven buys nothing further. The textbook sentence — a coupler curve is a sextic — comes back as a measurement, and the decision is made by the gap between the smallest singular value and the next, which here is a factor of 2.8e+3 — at 15, 21, 28 and 36 monomials respectively.
Fig. 8 Where the field meets its neighbours: a four-bar’s coupler curve, fitted for the polynomial that vanishes on it, comes back at degree six.

Where this sits against the rest of the site

Three neighbours, and the boundary with each is worth stating once.

Against synthesis. Synthesis is given positions and returns lengths. This field is given an equation and returns a machine. The overlap is the word design and nothing else: there is no objective function here, no defect test to disqualify an answer, and no finite number of solutions to count. The compiler returns one machine, and it returns it in about the time it takes to multiply out a polynomial.

Against the algebra field. That field asks how many configurations a mechanism has, by elimination and by continuation, and its object is a polynomial system whose unknowns are the joint coordinates. Here the polynomial is the specification and its unknowns are the plane’s coordinates. The two meet exactly once, three rungs into this ladder’s neighbours, where the coupler curve of an ordinary four-bar turns out to have an implicit equation of degree six — and that is a curve a linkage already draws, read the other way round.

Against the curves field. What a coupler point draws is a description of what a given linkage does. This is a prescription of what a wanted linkage must do. Same object, opposite direction, and the direction is the whole difference between a subject that can be enumerated and a subject that has to be constructed.

What a reader should take from this rung

One sentence, and the rest of the ladder is the evidence for it.

A polynomial in the two angles of a two-link arm is a finite sum of cosines of whole-number multiples of them, every one of those cosines is a link a handful of bars can hold at the right angle, and the sum being zero is a linkage closing. Everything after this is the arithmetic of that sentence, the four constructions that do the work, the count of what they cost, and the two ways the resulting machine can be right about its bars and wrong about its curve.

The last of those is the part worth arriving with. This site’s habit is that every claim gets a test it could fail, and the test here is not the closure residual. The closure residual is at the floor on every branch, including the ones drawing the wrong curve. The test is the polynomial, evaluated at a point the mechanism reached without knowing the polynomial existed.

The change from a sampled demand to an equation moves the trade rather than removing it, and it is worth saying where it moves to. Everywhere else on this site a mechanism is right at some places and approximately right between them, so the design currency is accuracy: more precision points, a smaller residual, a better fit. Here the mechanism satisfies the equation identically, so accuracy has nothing left to buy — and what takes its place is size. The mechanism grows with the equation: more terms, higher degree, more links, more joints, more of everything a real machine is costed in. So the question a designer asks changes character completely. Not how close can this get but how many parts does this equation cost, and the answer is an integer that grows with the demand rather than a residual that shrinks with effort. That is a genuinely different design activity, and it is the reason the mechanisms in this rung run to hundreds of links where the rest of the site’s run to six. Exactness was available all along; nobody wanted it at that price.

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.

Algebraic curveCoupler curveExact mechanismInverse problemKinematic synthesisLinkagePrecision positionUniversality