Blog

The solids that two forces can find, and the ones they cannot

A translucent icosidodecahedron in 3D: green triangles and amber pentagons over a cage of edges, with a pale sphere at each of its thirty vertices

Pick a kind of vertex and it appears. Select two and join them. Select three or more and you can stretch a face across them. Nothing has a position you chose — every vertex is wherever the forces put it, and the moment you change anything the whole structure rearranges.

Load a shape, or pick a kind on the right to drop the first vertex in.

drag to rotate · scroll to zoom · click to select · shift-click to add · drag a vertex to move it

Add a vertexloose

Charge is size, repulsion and edge length all at once: an edge settles at the square root of the two charges multiplied, so two plain vertices sit 1.00 apart and plain-to-huge sits 1.79 apart.

Selectionnothing

Click a vertex, edge or face in the view, or a number above. Clicking an edge or a face selects the vertices it is made of.

Kindscharge sets everything

  • Light0.55
  • Plain1.00
  • Heavy1.80
  • Huge3.20

Counts0 · 0 · 0

No faces yet, so there is nothing to count up.

Saved shapeskept in this browser only

Nothing saved yet.

There are two forces, and no angles anywhere.

The two forces

Every edge pulls, with the same force whatever its length. Not a spring: a spring has a rest length, which would be a way of writing the answer down in advance. This is a rubber band that never slackens and never pushes back.

Every pair of vertices repels, joined or not, with an inverse-square force proportional to the two charges multiplied. That second clause — joined or not — is the whole difference between this and a ball-and-stick model, and it is what makes faces come out regular rather than merely closed.

Written out, the thing being minimised is

U=∑edgesrij  +  ∑all pairsqiqjrijU = \sum_{\text{edges}} r_{ij} \;+\; \sum_{\text{all pairs}} \frac{q_i q_j}{r_{ij}}

and the program rolls downhill on it until nothing is moving.

Where edge length comes from

With no rest length, you might reasonably ask what sets the size of anything. Two vertices alone, with an edge between them, settle where the pull and the push cancel:

1=qaqbr2⟹r=qaqb1 = \frac{q_a q_b}{r^2} \quad\Longrightarrow\quad r = \sqrt{q_a q_b}

An edge is the geometric mean of the charges at its two ends. That is the entire size rule, and it is why the playground calls the knob charge and then uses the same number for how big a vertex is drawn, how hard it shoves, and how long its edges want to be. Two charge-1 vertices sit exactly 1.00 apart. Charge 1 against charge 4 sits at 2.00. Charge 0.25 against charge 9 sits at 1.50.

That last one is worth a second look. A vertex sixteen times lighter than its neighbour still holds an edge half again as long as a plain pair would — because what matters is the product, not the difference. A small charge beside a large one is dragged in less than you would guess.

In anything bigger than a pair the edges come out longer than qaqb\sqrt{q_a q_b}, because now there are non-neighbours pushing outward too and nothing pulling them back. How much longer is a question I will come back to.

Why the faces come out regular

Load the icosahedron. Twenty triangles, thirty edges, and every edge the same length to within a thousandth — with nothing in the program that knows what a triangle is, let alone an equilateral one.

The argument is short. The energy depends only on distances, so it is invariant under any relabelling of the vertices that preserves the graph. If the minimum is unique up to rigid motions, it has to be invariant under that group too — a symmetry of the graph that moved the shape to a different shape of the same energy would contradict uniqueness. So the settled shape inherits the symmetry of the graph, and any two edges the symmetry group can exchange must end up the same length.

Which gives a sharp prediction rather than a hope. Edges fall into orbits under the automorphism group, and the number of distinct edge lengths should be the number of orbits. Every preset here obeys it:

Edge orbitsDistinct lengths measuredSpread
Tetrahedron, cube, octahedron, dodecahedron, icosahedron110.000%
Cuboctahedron, icosidodecahedron110.000%
Prisms and antiprisms2221–45%
Truncated tetrahedron2262.6%
Truncated icosahedron2234.8%
Geodesic sphere2210.0%

The five Platonic solids are edge-transitive — one orbit, so one length, so regular. Nobody had to tell the program this. It is a consequence of the graph and would still hold if the force law were something else entirely.

The Archimedean solids come out wrong

Here is the part I did not expect. An Archimedean solid has all its edges equal by definition, so it ought to be a fair target. Two of them come out perfect and the rest come out badly.

The two that work are the cuboctahedron and the icosidodecahedron, at 0.000%. The truncated tetrahedron comes out at 62.6%, which is not a near miss: its triangle edges settle at 1.268 and its hexagon-to-hexagon edges at 2.062, so the corner triangles end up under two-thirds the size of everything else.

The split is exactly the one the orbit argument predicts. The cuboctahedron and the icosidodecahedron are the quasi-regular solids, and they are edge-transitive. Every other Archimedean is vertex-transitive but not edge-transitive: a truncated tetrahedron’s triangle edges and hexagon edges are in different orbits and no symmetry exchanges them.

So an Archimedean solid’s equal edges are a stipulation, not a symmetry. Somebody decided to build it that way. Nothing forces it, and a physics that does not know about the stipulation will not reproduce it. The Platonic solids are the ones whose regularity is compulsory, and they are exactly the ones that come out.

The model does have an opinion about where to cut, incidentally. Truncate an icosahedron at a third of each edge and relax it, and it does not stay at a third: the pentagons settle at 2.360 a side while the hexagon-to-hexagon edges stretch to 3.181. The football you get is a football whose black panels are too small, which is worth loading just to look at.

Faces, and how the program finds them

The find faces button takes a shape that has only vertices and edges and works out which rings of them are faces. The obvious approach is to call every short ring a face, and the octahedron is the counterexample that kills it: eight triangles are the faces, but the three squares round its equator are also perfectly good chordless four-cycles, and nothing local tells them apart.

What settles it is a property of polyhedra rather than of cycles: every edge borders exactly two faces. So the program collects the chordless cycles, sorts them shortest first, and accepts one only if every edge it needs still has room. The octahedron’s eight triangles use all twelve edges twice over, and the equatorial squares arrive to find nothing left to claim.

The same rule does the right thing at a boundary without being told about boundaries. A flat hexagon has one cycle and takes one face, not two, because there is no second cycle wanting the other side. A patch of triangles keeps its rim edges at one face each. It finds all thirty-two panels of the football, all eighty of the geodesic sphere, and all forty-eight quads of the torus.

The term I did not need

I also gave faces a job in the physics. A square is floppy on the face of it — four vertices can hinge about a diagonal while every edge keeps its length — so anything with four or more sides gets a force holding it flat, triangles being skipped on the grounds that a triangle has no choice.

Building it was the usual amount of care. The measure has to be scale-free, or its weight would mean something different on a big shape than a small one, so it is not the distance from the best-fit plane, which has units of area, but the fraction of a face’s spread that points out of its plane: the smallest eigenvalue of its scatter matrix over that matrix’s trace. Zero for a flat face, up to a third for a blob. The derivative comes out clean, because holding the eigenvector fixed is legitimate — that is the Hellmann–Feynman theorem — and the centroid’s contribution cancels:

∂∂xi(λτ)=2τ[(n^⋅di) n^−λτ di]\frac{\partial}{\partial x_i}\left(\frac{\lambda}{\tau}\right) = \frac{2}{\tau}\left[(\hat n \cdot d_i)\,\hat n - \frac{\lambda}{\tau}\, d_i\right]

which reads, once you stop squinting, as pull the vertex towards its face’s plane, and let the whole face grow if that is cheaper.

Then I measured what it does, and on every shape in the list the answer is nothing whatsoever. Turn it off and the cube’s faces are flat to one part in 103110^{31}. The prisms, the antiprisms, the football, the decagon — every one of them lands on the same edge lengths to twelve decimal places with the term off. The only preset that comes out differently is the torus, and its faces are flat either way; it merely falls into a different one of the many bad minima it has. There is a toggle for the term in the toolbar, and on these shapes you cannot make it do anything.

The reason, once you see it, is the same reason the faces are regular: the vertices of a face repel each other, including across the diagonals, and for a fixed rim the flat arrangement is the one that holds the diagonals furthest apart. Flatness was never a separate requirement. It was already implied by the thing that makes the polygon regular in the first place.

It does earn its keep once charges break the symmetry, which is the only place it can. Make two opposite corners of a cube huge and the squares really are forced out of plane — but to 0.0033 of their own spread with the term and 0.0050 without, which is a nudge rather than a rescue. I have kept it because it is the honest way to show that it is not needed.

Everything is the gradient of one number

The relaxer is not the interesting part; rolling downhill is rolling downhill. What matters is that the force is the exact gradient of the energy — the program checks it against finite differences and they agree to nine digits.

It matters because rolling downhill is not enough, and the case where it fails is one you will hit within a minute of using the thing. Build a chain of four vertices and join the ends. The chain is nearly straight, so closing it leaves a stretched quadrilateral in which every vertex is in genuine equilibrium: a real local minimum, at a 213% spread of edge lengths, and I let it run twenty thousand further steps to confirm that not one of them moved. The same four vertices, shoved and re-relaxed, go to a perfect square at 0.000%.

So every edit that closes a ring gets basin hopping instead of a plain roll, which is why the square you just built is square without your having to ask. But basin hopping compares candidate shapes by the energy, which is the whole reason the gradient has to be exact. A force that was not the derivative of the score would let the relaxer walk away from arrangements its own scoring preferred, and you would spend an afternoon blaming the step size.

The shoves themselves needed one more idea. Since every hop restarts from the best shape found so far, a deep wrong minimum is a trap, and shoves that are merely large do not get out of it. Dropped in at completely random positions, a cube came out mangled in five runs out of forty; with shoves of only the two smaller sizes, forty hops rescued not one of them — the same five were still wrong at the end as at the beginning. Adding a third shove big enough that it amounts to starting over takes it to zero out of forty in sixteen hops, for less work than the forty that failed. Exploring outwards from a place you cannot leave gets you nowhere, however long you do it.

One reassurance from all that random starting. Across forty random starts each of the cube, octahedron, icosahedron and dodecahedron, nothing ever beat the symmetric shape — the cube’s mangled runs scored 34.49 against the true cube’s 33.08, and the pattern held for the rest. The symmetry argument above assumed the minimum was unique, and this is the nearest thing to a check on that assumption you can get by running the program.

How big does a shape get?

Repulsion grows with the number of pairs, which goes as N2N^2, while the pull only grows with the number of edges, which for all these families goes as NN. So a big solid has to swell. The question is how fast, and it is answerable.

Put NN vertices on a sphere of radius RR. The repulsion totals about q2N2/Rq^2N^2/R, since the typical separation scales with RR. The nearest-neighbour spacing on such a sphere goes as R/NR/\sqrt N, so the edge term totals about E⋅R/NE \cdot R/\sqrt N. That makes

U(R)≈AR+BR,A∝q2N2,B∝ENU(R) \approx \frac{A}{R} + BR, \qquad A \propto q^2N^2, \quad B \propto \frac{E}{\sqrt N}

which is minimised at R∝A/BR \propto \sqrt{A/B}, and with E∝NE \propto N gives an edge length growing as N1/4N^{1/4}.

Measured, over the solids where every vertex has three neighbours, the local slope runs 0.46 from the tetrahedron to the cube, 0.35 from the cube to the dodecahedron, and 0.30 from the dodecahedron to the football. Over the all-triangle solids it comes up the other way: 0.20, 0.28, 0.29. Both are heading for something near a quarter and neither has got there, which is what you should expect when “asymptotically large” means sixty.

The practical consequence is milder than the argument sounds. Fifteen times the vertices, from the tetrahedron to the football, buys you two and a half times the edge length — 1.000 against 2.633. The shapes stay the size they look.

Where it goes wrong

The torus is the real failure. Its hole survives — the vertex count minus edges plus faces comes out as 0 rather than 2, and the readout says so — but its longest edge is 2.9 times its shortest, and it ends up with seven distinct edge lengths where the graph’s symmetry allows only two. So it has not merely distorted, it has lost its symmetry, which by the argument above means what I am showing you is not the unique minimum and the hopping is not finding the one that is.

The cause is not mysterious. On a sphere every vertex is pushed outward by everything else and there is nowhere further to go, so the pushing balances. A torus has an inside, and there is nothing in there pushing back.

A flat patch of triangles does not stay regular. Load the triangle patch. It stays flat — exactly flat, to the last digit, which is more than I expected — but its triangles are not the same size, and they get smaller the further out you look. The six edges around the centre settle at 1.764; the ones running inward from the boundary, the last step before the rim, settle at 1.231. The middle of the patch is 43% more open than the outside.

The direction of that is worth dwelling on, because I had it backwards before measuring. A vertex in the middle is pushed on from every side and those pushes cancel, leaving it free to spread out. A vertex near the boundary is pushed only from the inside, with nothing beyond it to push back, so it gets driven outward until it piles up against the rim. The patch is denser at its edge than at its centre — which is exactly what charge on a conducting disc does, arriving in a model that was not trying to do physics.

A hexagonal pyramid will not stand up without an unusually heavy apex, and the reason is a nice piece of hexagon trivia: a regular hexagon’s circumradius is exactly its side. So an apex whose edges want to be the same length as the base edges fits perfectly in the middle of the hexagon, flat. Load the preset and drop the apex from huge to heavy and watch it collapse into the plane. It is also, in one sentence, why hexagons tile.

Nothing resists twisting or bending. There is no torsion term at all, so a chain of vertices has no preferred conformation, and nothing in the model would stop a long enough ring from folding.

Things worth trying

If you like watching simple rules produce structure, the molecule builder is two rules about atoms that derive the whole of VSEPR, and shares an ancestor with this one: the repulsion in both is the Thomson problem in a hat.

Comments