Skip to content

Polytope

A polytope's face poset, drawn and clickable, by <notatio-polytope>.

The thing worth knowing about this picture is that every mark on it is a face. A polygon is a 2-face, a line a 1-face, a dot a 0-face, and each carries its own face data in data-face — so clicking recovers which face was hit without consulting geometry, and two faces that land on the same pixels stay distinguishable. Selection follows face identity, never screen position.

Nothing here is drawn geometrically. A face's polygon is the set of vertices incident to it and an edge is a 1-face with its two, both read straight off the containment relation. The only geometric step is ordering a face's vertices into a ring, by angle about its own exact barycentre — and that needs no hull algorithm, because every face of a polytope is convex.

whichFaces areOrder n is
permutahedronset compositions of {1..n}a truncated octahedron at 4
simplexnonempty subsets of {1..n}a tetrahedron at 4
cross-polytopesigned subsetsan octahedron at 3
associahedrondissections of an (n+2)-gon3 squares + 6 pentagons at 4

The four

The permutahedron

Faces are set compositions, not set partitions: block order is kept, so the counts are the Fubini numbers and the 24 vertices are the 24 orderings. The 6 squares and 8 hexagons fall out of vertex incidence — nothing tells the renderer this is a truncated octahedron.

source
<notatio-polytope which="permutahedron" n="4" />

The associahedron

The ways to bracket a product. Vertices are the 14 triangulations of a hexagon, placed by Loday's coordinates; the 9 facets come out as three squares and six pentagons, which is the check that those coordinates are right.

source
<notatio-polytope which="associahedron" n="4" />

The simplex and the cross-polytope

The Boolean lattice and the signed subsets — the two simplest face posets, and so the sharpest check on the machinery. The cross-polytope is also the one that does not lie in a hyperplane, which is why the projection reads a polytope's span off its vertices rather than assuming one.

source
<notatio-polytope which="simplex" n="4" />
<notatio-polytope which="cross-polytope" n="3" />

Selecting a face

Click any mark. Clicking replaces the selection and shift-clicking extends it, as anywhere else a list can be selected from. selected is written back as the face data, joined with ;, and a select event carries the face, its dimension and the new selection.

The click that ends a drag is not a selection — rotating the figure and landing the pointer on whatever came under it is nobody's intent, so a pointer that travelled more than a few pixels is read as a turn rather than a click.

Click to select

Click a polygon, line or dot to toggle it. The selection is the attribute, so it can be set from markup too — here one square of the truncated octahedron.

source
<notatio-polytope which="permutahedron" n="4" selected="1,1,2,2" />

Labels

Wolfram's MeshCellLabel is the model: labels are specified per cell dimension, not per cell, so "number the vertices" and "name the facets" are the same option with a different key. Two attributes carry it — labels says which faces speak, label-form says what they say.

labels defaults to selected, because a picture with 45 labels on it is not a picture — the label anyone wants is the one for the face they just clicked.

Naming what you click

The default. Click any mark and it says what it is: a set composition for the permutahedron, so 1,1,2,2 is the square where {1,2} precedes {3,4}.

source
<notatio-polytope which="permutahedron" n="4" />

A stratum at a time

labels="0" names one stratum — here the associahedron's 14 triangulations, numbered rather than spelled, since a dissection's data is a long word. labels="all" is only readable on a small figure.

source
<notatio-polytope which="associahedron" n="4" labels="0" label-form="index" />
<notatio-polytope which="permutahedron" n="3" labels="all" />

Counting instead of naming

label-form="vertices" writes how many vertices each facet has — and that is the truncated octahedron reading itself out: six 4s and eight 6s.

source
<notatio-polytope which="permutahedron" n="4" labels="2" label-form="vertices" />

One stratum at a time

dimension emphasises one stratum and dims the rest — the 1-skeleton here.

source
<notatio-polytope which="permutahedron" n="4" dimension="1" />

Recentre and reorient

The two motions that make a face poset explorable rather than merely drawn: recentre translates the selection to the middle, reorient turns it to look at the viewer.

A face's normal is computed without needing its vertices in any order — take the face's own tangent space and strip it out of the radial direction. That falls out correctly at every dimension: a vertex has no tangent space so its normal is radial, an edge loses only its own direction, and a 2-face is left with the true plane normal. The body has no normal at all, and says so rather than inventing one.

Settling on a hexagon

The chosen hexagon is brought to the middle and turned flat towards the viewer. The turn is the minimal rotation that does it, so the figure keeps its bearings instead of tumbling.

source
<notatio-polytope which="permutahedron" n="4" selected="1,1,1,2" recentre reorient />

A pentagon of the associahedron, face on

The same two motions on a polytope that is not vertex-transitive — the facets sit at different distances from the centre, and settling on one is how you get a look at it.

source
<notatio-polytope which="associahedron" n="4" selected="0,0,1,0,0,0,0,0,0" recentre reorient />

Attributes

AttributeDefaultWhat it does
whichpermutahedronwhich polytope
n4the order
selectedfaces to highlight, as face data joined with ;
dimensionemphasise this stratum, dim the rest
recentreoffbring the selection to the middle
reorientoffturn the selection towards the viewer
shadeonshade the 2-faces
azimuth / elevation / zoom30 / 25 / 1the camera, shared with the other 3-D figures
labelthe polytope's titlethe figure's caption

A polytope of order n that spans more than three dimensions — the 16-cell at order 4, say — is shown by its leading three scene axes. That is a projection, and the picture is honest about being one: the face counts stay right, but distinct faces can land on top of each other. Face identity is what keeps them apart.