The room a machine sweeps
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.
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.
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.
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 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.
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 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.
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.
- The hole the machine needs Links with a width
- The regions overlap and the parts never meet Links with a width
About the same objects
Not linked from either essay — found by the objects both name.
- A body is all size footprint · link body · occupancy grid · swept region
- Where the boundary moved interference · link body · swept region
- A clearance inside a tolerance box interference · link body
- A gap is a number interference · link body
- A link may be bent interference · link body
- A shape with a dent in it interference · link body
What links here
Essays that link to this one from their own argument.
- The hole the machine needs Links with a width
- The regions overlap and the parts never meet Links with a width
- Six things a body is not Drawn wrongly
- The gap is a straight line in the metal Links with a width
- A pin is not a point Links with a width
- The area a coupler point encloses The paths points trace
- Which numbers have a size Numbers that were measured
The objects this essay names
Each one links to every other essay that touches it.
FootprintInterferenceLink bodyOccupancy gridSwept pathSwept regionSwept volume