Configuration space

Walking a chord through a curve

This page explores a little geometric construction that I’ve had in the back of my head for a decade but never had time to explore.

Draw a curve on a 2D plane (it can cross over itself, and it doesn’t need to be smooth). Assume both ends extend to infinity along straight lines. Place a fixed-length ‘chord’ on one of the ends. Can you slide the chord through the curve to get it to the other end, while the chord’s ends stay on the curve? How do you do it? Think of it as two tightrope walkers on a funny tightrope, holding a stiff plank between them: can they get round the bends? when do they say “to me, to you”?

This page allows you to pick a curve or draw your own, and watch the chord walk through it. I think the movement is quite satisfying to watch. You can also pick or draw a closed loop/curve.

Configuration Space

The plot below the settings panel shows the possible configurations of the chord. Measure each endpoint’s position by its length along the curve. The x-axis shows the position of the tail and the y-axis shows the position of the head.

The plotted lines show valid placements of the chord, where the straight-line distance between the endpoints equals the chord length. The structure & connectivity of these valid placements changes, sometimes in very interesting ways, as the chord length changes. There can also be isolated pockets of placements off the main diagonal that are not connected to the infinite ends.

Moving up and to the right means both head & tail are moving forward along the curve. Moving up and to the left means the tail is backtracking. Moving down and to the right means the head is backtracking.

You can click on any point in the configuration space to select the nearest valid placement.

Drag the chord length slider and watch how the structure of the configuration space evolves. Some particularly interesting ones are: Reuleaux Triangle, Closed Square, D with Overlapping Tails, Parallel Channel. These all have ‘critical’ lengths at which the connectivity of the configuration space changes suddenly.

The Algorithm

A stylised algorithm for moving a chord through a curve is: start moving the head and tail forward along the curve. Whenever the curve’s tangent at one end crosses perpendicular relative to the chord, change the direction of travel of the opposite end. Unfortunately, this algorithm doesn’t handle certain interesting curves, for example ones where the chord ends up perpendicular to both ends at once, or there are ‘forks’ in the configuration space.

In practice, the curves on this page are all finite polylines, i.e. points connected by line segments. The page uses this finite structure to construct the configuration space and the animations. It first considers all pairs of straight segments, and decides whether & how the chord could connect those two segments. It then builds a finite graph of all valid segment pairs, based on how their vertices connect. It then searches for journeys through that graph. It tries to find the shortest journey that connects the two end configurations. Within each segment pair (i.e. between vertices of the graph), the chord can be moved continuously while preserving its length.

You can click on any point in the configuration space, and it will try to find a short complete journey that passes through that point in the configuration space. Sometimes that region of the configuration space is not connected to the main axis. Sometimes there is also no path at all.

Which Curves are Traversable?

There are some curves that are obviously not traversable for sufficiently long chords: curves whose ends are parallel & head off in the same direction (i.e. ‘hairpins’). Why? The entire curve can be bounded between two parallel lines. To traverse the curve and come back out facing the other way, the chord has to flip around, i.e. at some point it will have to be perpendicular to those bounding parallel lines. But a chord longer than the distance between the parallel lines can’t do that.

A wiggly curve with parallel incoming and outgoing tails, contained between dashed bounds a distance w apart. A vertical chord longer than w extends outside the bounds.

Are all other open continuous curves traversable for any length of chord? It seems not. All finite polylines whose incoming and outgoing travel directions are not opposite are traversable (AI proof). But it is possible to create a counterexample for a general continuous curve, involving a small oscillating function (full AI proof, lean). It involves a curve with an infinite zigzag structure that approaches a point ‘O’, and a circular arc centered on that point, whose radius equals the chord length. When the tail is at a northeast vertex, the head of the chord needs to be outside the arc, past ‘N’. When the tail is at a southwest vertex, the head of the chord needs to be on the horizontal spoke, before ‘E’. As the zigzag gets smaller and smaller and the tail of the chord approaches ‘O’, the head of the chord needs to swing between two far away places (‘N’ and ‘E’). But both endpoints need to move continuously in time, so the head can’t have a continuous position at the moment the tail reaches ‘O’:

A shrinking zigzag and a quarter-circle, with two unit-chord placements and an enlarged view of the zigzag.

Words & ideas by me. Code, images & proofs by AI.

Jack Frigaard
November 2026