Links with a width

The room a machine sweeps

Every point any part of a machine occupies at some position of its drive. It is a region rather than a curve, its area is an integral computed two ways, and the one shape in the field with a closed form is what the grid is calibrated against.

Assumes A link that takes up room.

Ask where a machine is and the answer is a configuration. Ask where a machine has been, over its whole drive, and the answer is a region of the plane — every point that some part of it occupies at some position.

That object has not existed on this site before, and it is worth being clear about why not. Every locus the site has drawn is the path of a point: a coupler curve, a centrode, the swept path of a wheel’s contact. A point sweeps a curve. A body sweeps a region, and the difference is not a thickening of the curve, because a body’s far corner reaches places its pin never goes.

The room crank rocker needs. The shaded region is every point any part of this machine occupies at some position of its drive, computed as an occupancy grid over 150 solved configurations and outlined by marching squares — so the outline drawn is the boundary of the set the area was counted from rather than a second object that agrees with it. Its area is 12.78 square units, filling 54% of the box that contains it. The dashed rectangle is the box the joints need, which is what every figure that treats links as lines could have told you; the material needs a box 20% larger in area.
Fig. 1 Every point any part of this four-bar occupies at some angle of its crank, with the machine drawn at one of them.

What is computed, and how

An occupancy grid. Lay a grid over the region the machine could possibly reach, and mark a cell occupied if its centre is inside any placed piece of any part at any sampled configuration. That is one point-in-polygon test per cell per piece per frame, restricted to each piece’s own bounding box, which on a 220-square grid and 150 frames is a fraction of a second.

The picture is drawn from the same grid. The outline in every figure here is the set of cell edges with an occupied cell on one side and an empty one on the other — not a smoothed boundary, not a separately computed hull, but the literal boundary of the set the number was counted from. The picture and the caption cannot drift apart, which on a quantity as easy to draw approximately as this one is worth more than a prettier outline.

An exact union of a few hundred polygons is computable and is a different subject. What is wanted here is an area and a picture, and the grid gives both from one object.

The room Watt's linkage needs. The shaded region is every point any part of this machine occupies at some position of its drive, computed as an occupancy grid over 150 solved configurations and outlined by marching squares — so the outline drawn is the boundary of the set the area was counted from rather than a second object that agrees with it. Its area is 7.75 square units, filling 55% of the box that contains it. The dashed rectangle is the box the joints need, which is what every figure that treats links as lines could have told you; the material needs a box 28% larger in area.
Fig. 2 Watt’s linkage over its measured arc — the smallest region in the catalogue, at 7.75 square units.

Two routes to the area

The area could be the cell count times the cell area and stop there. It is checked instead, twice, and the two checks are different in kind.

Against a second quadrature. Throw random points into the bounding box and count how many land in some placed piece; the hit fraction times the box area is the area. On the crank’s own swept region, at 8,000 points, that gives 4.2434 against the lattice’s 4.2349 — a fifth of a per cent apart.

That agreement checks the quadrature and not the geometry, and the essay should say so rather than let a reader assume more: both routes ask the same membership question of the same polygons, so an error in what counts as inside would move both identically. What differs is how the plane is sampled — a regular lattice with a systematic bias at the boundary, against random points with a statistical error going as one over the square root of the count — and it is a real check on the discretisation.

Against a closed form. For the geometry there is exactly one shape in this field whose swept area can be written down, and it is the crank.

The one closed form

A body carried by a link that turns all the way round about a fixed pivot sweeps the annulus between its nearest and its furthest corner radius — and if the body covers the pivot, as every crank on this site does, the near radius is zero and the annulus is a disc.

The crank rocker’s crank is a bar of half-width 0.16 with bosses of 0.216, on a link of length 1. Its furthest corner is at 1.1628 from the pivot, so the swept disc has area 4.2478, exactly, with no sampling anywhere in it.

The grid gives 4.2349, low by 0.3%, and low is the expected direction: a cell counts only if its centre is inside, so the boundary cells are lost on average, and the deficit goes as the cell size times the perimeter. The random points give 4.2434, low by 0.1%. Both routes bracket nothing and both are close, and the discrepancy behaves as the resolution says it should.

This is the only calibration available and it does a specific job: it checks that the placement is right — that a body carried by a link really is where the code puts it — which no comparison of two quadratures can. The pin sweeps a circle of radius 1 and the material sweeps a disc of radius 1.163, and the difference between them is the whole content of this field applied to the simplest possible case.

The one swept region with a closed form. A body carried by a link that turns all the way round sweeps the disc between its nearest and furthest corner radii — and this crank's material covers its own pivot, so the near radius is zero and the region is a disc of radius 1.1628, area 4.2478. That is the only shape in this field whose area can be written down, which is exactly why it is the one the grid is calibrated against: the occupancy grid gives 4.2333, out by 0.34% at this resolution, and random points give 4.2528. The two estimators share a membership test, so their agreement checks the quadrature; the circle checks the geometry.
Fig. 3 The grid, against the circle the closed form gives. The one shape here whose area can be written down.

Why not thicken the curve

The obvious cheap construction is to take the centrelines’ loci and thicken them by the link half-width. It is wrong, and the crank says by how much: the pin’s circle thickened by 0.16 has outer radius 1.16, which is nearly the right answer for the wrong reason, and thickened by the boss would give 1.216, which is too much.

The true reach is 1.1628, and it is neither: it is the distance to the corner of the octagon at the far end, which is set by where the boss’s tangent cut lands. Thickening a curve gets the sides right and the ends wrong, and the ends are where the reach is.

For a link that is not carried by a fixed pivot the construction fails more thoroughly. A coupler’s far corner traces a curve that is not the coupler point’s curve offset by anything: it is a different point of the same moving body, and the curvature field is entirely about how differently two points of one moving body behave. Every corner of a body has its own locus with its own centre of curvature, and the swept region’s boundary is made of pieces of those loci and pieces of the body’s own edges, joined where an edge is tangent to its own envelope.

That is a perfectly good way to compute the boundary analytically and it is a different piece of machinery. The grid gets the same set with one idea instead of three.

The boundary, and what it is made of

It is worth knowing what the outline of a swept region is, even though this field computes it by counting cells rather than by constructing it, because the construction says what kind of curve is being approximated.

A point of the boundary is a point that some body reaches at some configuration and no body passes. There are two ways for that to happen. Either it is on the envelope of a moving edge — the edge is tangent there to the curve it sweeps, which is the classical envelope condition the cams field is built on — or it is on the locus of a corner, which is an ordinary path of a point of a moving body and therefore has all the apparatus of the curvature field attached to it.

So the boundary is a patchwork: arcs of corner loci joined to arcs of edge envelopes, meeting where a corner takes over from an edge. That is the same structure the gap function has — smooth pieces meeting at changes of which feature governs — and it is the same reason: a maximum over features, and the argmax changing hands.

Drawing it that way would be exact and would need the tangency condition solved for each edge, the corner loci traced, and the intersections found. The grid gets the same set for one idea and one resolution parameter, and the price is that the boundary is a staircase at the cell scale.

The room Peaucellier's cell needs. The shaded region is every point any part of this machine occupies at some position of its drive, computed as an occupancy grid over 150 solved configurations and outlined by marching squares — so the outline drawn is the boundary of the set the area was counted from rather than a second object that agrees with it. Its area is 43.70 square units, filling 77% of the box that contains it. The dashed rectangle is the box the joints need, which is what every figure that treats links as lines could have told you; the material needs a box 13% larger in area.
Fig. 4 The largest region here, and the one whose shape is hardest to package: a tall slot ten units high.

The regions, over the catalogue

Areas, at the standard width, over each machine’s own drive:

The crank rocker sweeps 12.77 square units; the drag link, whose two long links both turn fully, 21.20; Chebyshev’s linkage 25.82, the largest in the catalogue; Peaucellier’s cell 43.69, which is not comparable because its drive is a wide arc and its links are long; Watt’s linkage 7.75 and the slider crank 7.78, the two smallest.

The numbers on their own are not very interesting, and that is worth saying plainly rather than dressing them up. What is interesting is what they are compared against, which is the next essay: the region’s area against the box that contains it, and the box against the box the joints alone would need.

What the region is for

Three uses, all of them things a designer does and none of them anything this site could previously supply.

Guarding. A machine that sweeps a region needs nothing else in it. The region is the shape of the guard, the keep-out zone, the hole in the panel — and it is the exact shape rather than a bounding box, which matters when the region is a fifth of its own box.

Packaging. Whatever else has to be nearby goes outside the region, and how much room is left inside the machine’s own envelope is a real design quantity. That is the fill fraction of the next essay, and on these machines it runs from a half to four fifths.

And interference against something that is not part of the machine. A fixed obstacle interferes if and only if it meets the swept region — which is a cheap, conservative pre-test before any sweep is run: if the obstacle misses the region, no configuration can collide, and no sampling question arises at all.

That last one is worth pausing on, because it inverts the certificate. A swept check samples configurations and can miss one; a swept-region test looks at a set that already contains every configuration, so a clear verdict from it is unconditional. What it cannot do is the converse — an obstacle inside the region may still never be hit, because the region is the union over all times and the obstacle may be in the part of it the machine occupies at some other moment. Which is the field’s standing distinction: a region has thrown the time away.

The room Chebyshev's linkage needs. The shaded region is every point any part of this machine occupies at some position of its drive, computed as an occupancy grid over 150 solved configurations and outlined by marching squares — so the outline drawn is the boundary of the set the area was counted from rather than a second object that agrees with it. Its area is 25.82 square units, filling 78% of the box that contains it. The dashed rectangle is the box the joints need, which is what every figure that treats links as lines could have told you; the material needs a box 17% larger in area.
Fig. 5 Chebyshev’s linkage over its own arc: the largest swept region in the catalogue, and the only machine in it that could be built in one plane.
The room a crank rocker with a post needs. The shaded region is every point any part of this machine occupies at some position of its drive, computed as an occupancy grid over 150 solved configurations and outlined by marching squares — so the outline drawn is the boundary of the set the area was counted from rather than a second object that agrees with it. Its area is 11.76 square units, filling 50% of the box that contains it. The dashed rectangle is the box the joints need, which is what every figure that treats links as lines could have told you; the material needs a box 20% larger in area.
Fig. 6 A region with an obstacle in it, which is not part of the machine and is not part of the region.

What the grid resolution decides

Everything about the number and nothing about the picture’s meaning, which is the right way round.

At n cells across, the area error goes as the perimeter times the cell size — so doubling the resolution halves the error, and the observed 0.3% on the calibration case at 300 cells is consistent with that. The cost goes as n² times the frame count, so the tables here run at 170 and the calibration figure at 300.

The sample count in the drive matters differently and more subtly. The region is a union over configurations, so a coarse sweep gives a region with gaps in it — a machine sampled twelve times over a turn sweeps twelve overlapping snapshots and the union has scalloped holes where nothing was sampled. That is a visible artefact rather than a silent one, and the sweep counts here (90 to 150) are chosen so that consecutive frames overlap generously. The rule is the same as the certificate’s and can be stated with the same V: consecutive frames overlap when V·Δθ is smaller than the link width, which at V ≈ 1.26 and width 0.16 means Δθ under 0.13, or fifty samples over a turn.

The room slider crank needs. The shaded region is every point any part of this machine occupies at some position of its drive, computed as an occupancy grid over 150 solved configurations and outlined by marching squares — so the outline drawn is the boundary of the set the area was counted from rather than a second object that agrees with it. Its area is 7.79 square units, filling 57% of the box that contains it. The dashed rectangle is the box the joints need, which is what every figure that treats links as lines could have told you; the material needs a box 36% larger in area.
Fig. 7 The slider crank’s region, with its guide rails standing in it.

The region depends on the arc, not just on the machine

A machine that turns all the way round has one swept region. A machine that rocks has a region that depends on how far it rocks, and that is a decision somebody makes rather than a property of the lengths.

Every arc in this field is either a full turn or measured by workingArc — the site’s own instrument, which walks outwards from a solved configuration in steps until the solve stops converging, and reports the arc the mechanism actually owns. Watt’s linkage, Chebyshev’s and Peaucellier’s cell are all driven that way here, inset slightly from their limits so that no frame is asked for at a dead centre.

The alternative — typing an arc that looks reasonable — was the first version, and it failed in the way that kind of thing fails: Watt’s linkage was given ±0.55 radians about its symmetric pose, which reads as a modest fraction of a turn and is more than the linkage has. Fifty of a hundred and twenty samples did not assemble. A swept region with holes in it where the solver gave up is not a swept region, and its area is a number about which frames survived.

So a region here is quoted with its arc, and the arcs are measured. Two of them are worth having in mind when the areas are compared: Chebyshev’s is 0.99 radians and Peaucellier’s 3.15, against 6.28 for anything that turns fully. The largest region in the catalogue belongs to a machine that uses a sixth of a turn.

What is not being computed

Not a volume. These are areas of plane regions. The real machine occupies a volume, and its depth is the plane count of the layers essay — but the two are not multiplied here, because different links are in different planes and the region each sweeps is different. The honest three-dimensional object is a union of prisms of different heights, and it is not drawn.

Not a swept volume in the manufacturing sense. A cutter’s swept volume is the material it removes, and the shape that matters there is the complement. Nothing here is about removal.

And not a reachable set. The region is where the machine’s material goes, not where its output can be put. The serial field’s workspace is the second thing, and the two are different sets computed from different questions — a point can be in the swept region because a link passed over it while the tool was elsewhere entirely. The arm essay is where the two meet.

The box the joints need, and the box the machine needs. Every machine in the catalogue, measured twice over the same drive: the extent of its joint positions, which is what a site drawing links as lines can report, and the extent of its material, which is what has to fit in something. The ratio runs from 1.13 to 1.36 — between thirteen and 36 per cent more area than the skeleton suggests, on machines whose links are a twentieth of their length wide. The last column is how much of the material's box the swept region actually fills, and it is where the packaging argument really is: a machine at 50% is a machine with a great deal of room inside its own envelope that nothing may be put in.
Fig. 8 The regions, with the boxes they sit in — which is the comparison the next essay is about.

A region is not a shape somebody chose

One more property, and it is the one that makes these pictures worth looking at rather than merely computing.

The swept region of a mechanism is not designed. Nobody picks it; it falls out of four lengths and a set of widths, and it is often a shape nothing about the drawing would suggest. The crank rocker’s region is a lobed blob with a bite out of the middle; the drag link’s is nearly an annulus; Watt’s is a flattened crescent. None of them is the union of anything a designer drew.

That is the same relationship this site has to a coupler curve, and it is worth the comparison. A coupler curve is a sextic with a shape nobody chose either, and the whole of the curves field is about what those shapes are and which of them can be asked for. The swept region is the two-dimensional version of the same situation, and this field does not go anywhere near the inverse problem: given a region, what mechanism sweeps it. That is a genuine question, it is much harder than the coupler-curve version, and nothing here touches it.

What can be said is the modest thing. The region is computable from the mechanism, exactly, before anything is built; it is the shape the guard has to be; and until a link had a width there was no way to ask for it.

The habit, applied to an integral

There is a general point about how a quantity like this should be reported and it is the reason the closed form gets a figure of its own.

An area computed by counting cells is an estimate, and an estimate compared only against another estimate of the same kind is a statement about the estimators. The two quadratures here agree to a fifth of a per cent, and that agreement would survive the bodies being placed in completely the wrong place, because both routes would ask the same wrong polygons the same question.

So the geometry needs its own check, and the only honest one is a case whose answer is known independently. A rotating body’s disc is that case: πR² with R read off the placed corners, against a number counted out of a grid. It is one shape out of nine, it is the simplest one, and it is the only reason to believe the other eight.

The staircase, as an interval with a proof under it

The area above is counted off an occupancy grid: a cell is marked when its centre is covered, so the region has a boundary that is a staircase at the cell scale and the area is a point estimate with nothing under it. Three figures and one number are counted from that grid, and the exact boundary — a patchwork of corner loci and edge envelopes, joined where an edge becomes tangent to the curve it sweeps — is real work and a second object to keep in step with the first.

A bracket is the cheaper half of what that would buy and it is rigorous. Classify every cell three ways instead of two:

  • inside, if all four of its corners lie in one convex piece at one frame. The pieces are convex, so the whole cell is in that piece and therefore in the union.
  • undecided, if some piece’s edge passes within half a cell diagonal of the centre. If a cell meets the union with no corner in it, part of the union’s boundary crosses the cell, and that boundary is made of piece edges — so this cannot miss a cell the union touches.
  • outside, everything else, provably disjoint from the union.

The true area is then between the first and the first plus the third, and the staircase stops being an unquantified approximation.

On the housed four-bar the swept area is in [11.413, 12.054] at a grid of 200, an interval 5.5% wide, and the 11.726 this field quotes sits inside it. At 60 it is [10.720, 12.801] and 17.7% wide.

The bracket closes as the cell size, with a fitted slope of 0.98 over four resolutions — which is the check that matters, because it says the undecided band is a boundary effect and nothing else. A band that closed as the cell area would mean the classification was leaking somewhere in the interior; one that did not close would mean it was wrong about the edge.

So the number is now quoted the way a measured number should be: an interval, with the resolution that produced it and the rate at which it narrows. What it still is not is the exact boundary — that patchwork is not built, and a bracket is not a construction. It is the difference between knowing an area to a stated 5.5% and knowing it to a staircase of unstated width, and that is most of what the exact boundary was wanted for.

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.

FootprintInterferenceLink bodyOccupancy gridSwept pathSwept regionSwept volume