Four terms of eighteen draw the quintic
Assumes The cheapest curves at each degree and Every curve is a sum of cosines.
The cheapest curves at each degree found which curves a compiled machine builds for least. The machine drives a two-link arm whose tip traces a curve. The compiler rewrites the curve’s equation as a sum of cosines of whole-number combinations of the arm’s two angles, and every cosine is a gadget the machine must contain. Searched exhaustively, the cheapest curves at every degree turned out to be concentric circles about the arm’s pivot and lines through it, in the arrangements Chebyshev’s polynomials give: one term at every even degree, two at every odd one.
A designer rarely wants those. A designer has a curve — a cam track, a coupler path, a curve from a catalogue — and the census made a second question askable. How far from that curve is the nearest cheap one? Fix a budget of terms and find the curve with no more than that many that comes closest to the target where the arm can reach. At the target’s own count the distance is nought. Below it the distance is positive, and the distances as the budget falls make a price curve that nobody had drawn.
Exact costs more than close found that for straight-line mechanisms there is nothing between Watt’s four bars at nine per cent and Peaucellier’s seven at exact. The compiler’s price curve turns out to be different, and the difference depends on the curve.
How the nearest curve is found
The search has to be over sets of terms, and it helps that the sets are small. Every curve is a sum of cosines of the arm’s angles, , and each surviving pair is a term. Because the arm’s two links are the same length, swapping them leaves the tip where it is, so every equation’s amplitude on equals its amplitude on . The terms come in mirror classes: a pair with its mirror, costing two terms, or a pair on a diagonal that is its own mirror, costing one. A support is a set of classes.
For a chosen support the curves of the target’s degree whose expansion lives inside it are a linear family, since the expansion is linear in the equation’s coefficients. The members are the equations whose amplitudes on every pair outside the support vanish, a null space. Within that family the target is fitted to points of itself inside the reach, by least squares weighted to measure distance rather than equation value. The fitted curve is then measured both ways: the worst distance from the target to it, and from its own points inside the reach back to the target. The second catches a close fit that has grown a stray branch elsewhere in the reach.
Every support within the budget is tried, which is up to several thousand for a quintic, and the price at a budget is the least over all of them. The distances below are quoted as shares of the arm’s reach, which is two link lengths.
Six curves, two kinds of price
The six targets are the catalogue’s conics and higher curves at their own degrees: an ellipse and a parabola of degree two, a cubic and a folium of degree three, a lemniscate of degree four, and a quintic of degree five.
The curves split into two kinds, with nothing between them. The cubic’s equation costs eight terms, and its nearest four-term curve is 0.75% of the reach away. The quintic’s costs eighteen, and four bring it to 1.4%, six to 0.68%, eight to 0.32% and ten to 0.021%. For these two the cost of drawing closely is a fraction of the cost of drawing exactly.
The other four stay far until their last term. The ellipse costs four terms and the nearest curve with three is 11% of the reach away. The lemniscate costs five, and four leave 7.9%. The folium costs eleven, and ten leave 5.2%. The parabola costs six, and five leave 35%. For these four, a machine that is not exact is not close either.
At half the equation’s terms, the cubic and the quintic are within 0.75% and 0.32% of the reach, and the others between 11% and 35%. The split does not follow the degree, since both kinds occur at degree three, nor the number of terms, since the cheap quintic has the most.
What the four terms are
The figure below shows the quintic and its nearest four-term curve, which is indistinguishable from it at the figure’s scale over the whole reach. The four terms are two classes, and , and what they are is visible in the census that found the cheapest curves.
The first class is what and themselves expand into: the tip’s coordinates are and , frequencies and . The second is what the square of the radius, , adds when it multiplies them: and expand into the first class and the second and nothing else. So the family of curves the four terms can draw is
a line through the pivot bent by the square of its distance from it. The quintic’s nearest four-term curve is exactly that, with , , and . Its nearest six-term curve adds one more class, , which is what and contribute: the next power of the bending. The cubic’s nearest four-term curve has the same two classes.
That family is the odd-degree end of what the cheapest curves at each degree found. There, a line through the pivot times Chebyshev’s polynomials in the elbow angle was the cheapest curve of odd degree. Here the same pieces, added rather than multiplied, make the family that is cheap to be near. In polar coordinates every member passes through the pivot once, with a single tangent, and away from the pivot its radius at each direction is set by a ratio of two cosines.
Why four curves cannot be reached
The family explains the split. The cubic and the quintic both pass through the pivot once, with one tangent, and bend away from that tangent as the radius grows. That is the shape the family has, and a few powers of the radius are enough to follow them across the reach.
The four expensive curves do not pass through the pivot that way. The ellipse and the parabola do not pass through it at all. The lemniscate and the folium pass through it twice, crossing themselves, so their lowest-order part at the pivot is a pair of lines rather than one. No member of a family with a single tangent at the pivot can follow a crossing there, and adding powers of the radius cannot supply a second tangent. Those curves’ nearest cheap neighbours come from other classes, and the price curve shows none of them gets close.
The ellipse shows what the nearest cheap neighbour is when the family is out of reach. Its equation, , costs four terms in three classes: and alone, and the pair . Given one, two or three terms, the nearest curve keeps the same single class, , a cosine of the elbow angle alone, and adding does not move it. A cosine of the elbow angle alone is a circle about the pivot, the cheapest curve there is. So the nearest cheap curve to the ellipse is a circle between its two semi-axes, 1.265 and 0.853, and it misses by about half their difference: 0.21 by that arithmetic, 0.228 measured, 11% of the reach. The ellipse’s eccentricity is the whole of what its fourth term buys, and no rearrangement of fewer terms buys any of it back.
The folium with ten of its eleven terms shows what that costs. The nearest ten-term curve follows the two arms of the folium away from the pivot and the loop’s far side, and misses at the crossing, where it passes on one side instead of through, and around the loop, by 5.2% of the reach. The one term it lacks is the one that makes the crossing a crossing. With a budget one short of exact, a machine drawing the folium draws a different curve. The lemniscate is the same case at a smaller size. It costs five terms and crosses itself at the pivot too. Its nearest four-term curve, 7.9% of the reach away, trades the lemniscate’s own class for , a class the lemniscate does not contain. It still draws a figure of eight through the pivot, but a flattened one: its two branches cross at a shallower angle, and its lobes are too thin at the middle and too long at the ends. Four terms can make a crossing; they cannot make this one.
The terms that matter are not the largest
The natural shortcut, without a search, is to keep the target’s largest terms and refit. On the quintic that shortcut fails at the first step that matters.
The quintic’s classes, by amplitude, are at 6.289, at 3.139, at 3.127, at 1.566, and then five smaller ones down to 0.063. The second and third differ by 0.4%. The nearest four-term curve keeps the first and third. It passes over the second, because the second is not part of the line-bent-by-its-radius family and the third is. The nearest curves with more terms keep reaching into classes of amplitude 0.6 and 0.3 while passing over the second-largest class, and the nearest ten-term curve leaves it out entirely.
Kept in order of amplitude and refitted, the quintic is 21% of the reach away at four terms, fifteen times the searched curve’s 1.4%, because the fourth term chosen is from the second-largest class. At eight terms the truncation grows a stray branch across the reach and is further away than at six. Only from ten terms on does keeping the largest reach what the search reaches, and from there it goes on down, to at fourteen, where the search was not run.
An amplitude says how large a term is in the expansion. It does not say how much of the curve’s shape inside the reach depends on it, because much of a large term can be cancelled by the others within the reach and much of a small one cannot. The search measures that; the amplitudes do not.
What the budget buys in bars
A term is a gadget, and a gadget is bars: angle multipliers built from nested parallelograms, adders, translators that carry a vector to where it is needed. So the price curve can be read in the unit a machine is actually built in. The machine compiled from the quintic’s exact equation has 413 bars. The machine compiled from its nearest four-term curve has 37, and it is 1.4% of the reach away. Six terms take 78 bars and come within 0.68%, eight take 110 and ten take 157, 0.021% away. The cubic’s exact machine has 101 bars, and its four-term neighbour has the same 37 as the quintic’s, since it is built from the same two classes.
The bars do not fall in proportion to the terms. A high-frequency term needs an angle multiplied several times over, each multiplication a stack of parallelograms, and the quintic’s highest classes are the most expensive gadgets in its machine. Those are exactly the classes the nearest curves do without. So the four-term machine is less than a tenth of the exact one’s size, where four terms of eighteen would suggest a fifth, and it draws the quintic across the whole reach to within 1.4% of the reach.
The price is on the equation found that a curve’s cost depends on which of its equations is compiled: multiply an equation by a factor that vanishes nowhere in the reach and the curve is the same while the machine is not. The price curve here is a second way the same curve can come cheaper, by giving up exactness rather than changing the equation, and for the quintic it is the larger of the two by far. A demand that is an equation set out to compile any curve exactly. That generality has a price the approximate versions escape, provided the curve is of the right kind.
Prescribing a curve rather than points put the compiled machine’s four hundred bars beside a four-bar that passes through nine prescribed points and no more. The four-term machine sits between them. It follows the curve everywhere in the reach, which the four-bar does not, and it does so with a tenth of the exact machine’s bars. The trade that the linkage that is only nearly right made by choosing precision points, the compiler makes by choosing terms, and the search here is its version of choosing them well.
What a designer can take from it
The price of a close machine is not the price of the exact one scaled down, and a designer cannot tell the two kinds of curve apart by counting terms or by degree. What tells them apart is geometric and checkable before any search: whether the curve passes through the arm’s pivot once, with one tangent. If it does, a machine can be built from a line through the pivot bent by one or two powers of the radius, at four or six terms, whatever the curve’s own count. If it does not, the whole equation is the price.
That also says where to put the pivot. The pivot is the designer’s choice, since the arm can be mounted anywhere. A target curve that passes nowhere near the pivot, like the ellipse here, might be cheap to be near if the arm is mounted on it. Two circles for the price of one found that concentric circles about the pivot are nearly free. A circle elsewhere costs more, and the same circle with the pivot at its centre costs one term.
What the search does not settle
One degree. Every nearest curve here has the target’s own degree. A curve of higher degree can be cheaper, as the Chebyshev circles are, and a search that allowed it might find cheaper neighbours for the four expensive curves. The search at higher degree is larger and was not run.
The reach, not the arc. The distance is measured over the whole of the curve inside the arm’s reach. A machine that draws only one arc of a curve could be close on that arc and far elsewhere, and priced on the arc alone the expensive curves might be cheaper.
Budgets up to ten. For the quintic the search stops at ten terms; beyond that only the truncation was measured, and it is an upper bound on the price.
The machine’s own error. The compiled machine draws its curve exactly in principle. Every bar has a length error in practice, and a machine of four terms has fewer bars to be wrong. Whether that makes the close machine closer, in practice, than the exact one is not measured here.
Still open: moving the pivot
The split between cheap and expensive curves is about where the curve passes relative to the pivot, and the pivot can be placed. Mount the arm at a different point and the same target has a different equation, a different expansion and a different price curve.
The distinct argument there would be the best place to mount the arm for a given target, priced by the nearest curve at a fixed budget. For the ellipse, the pivot at its centre makes its axes into terms the census has already priced; on the curve itself, the ellipse passes through the pivot once, with one tangent, and the four-term family might follow it. The measurement would take the ellipse, the parabola and the folium, sweep the pivot over a grid of positions around each, and map the nearest four-term curve’s distance. Its minimum would say whether an expensive curve is expensive in itself, or only because of where the arm was put.
What this makes readable
Essays that name this one as a prerequisite.
- Moving the pivot only adds terms The curve as an equation
- The quintic's cheapness runs along a line The curve as an equation
About the same objects
Not linked from either essay — found by the objects both name.
- A compiled machine and its own scale compiled machine · implicit equation
- A degree counted on a line algebraic curve · implicit equation
- The curve nobody eliminates algebraic curve · implicit equation
- The equation a four-bar satisfies algebraic curve · implicit equation
- Three linkages, one equation algebraic curve · implicit equation
- What universality is worth algebraic curve · cost model
What links here
Essays that link to this one from their own argument.
- Moving the pivot only adds terms The curve as an equation
- The quintic's cheap pivots lie off the line The curve as an equation
- The quintic's cheapness runs along a line The curve as an equation
The objects this essay names
Each one links to every other essay that touches it.
Algebraic curveApproximationCompiled machineCost modelFrequency pairImplicit equationSparsityTrigonometric polynomialTwo-link arm