Reversible state transitions and programmable self-assembled particle patterns by dynamic boundary confinement. (A) Confinement sampled at relevant values of the area fraction and described by the radial distribution function (the parameter is the interparticle distance normalized with particle-diameter). Solid and dashed lines correspond to compression and decompression of the arena, respectively. Their overlap demonstrates the reversibility of the system. (B) Total magnetic potential energy and kinetic energy of 25 particles during confinement. Overlapping solid (+) and dashed lines (−), respectively, for compression and decompression of the arena reflect the reversibility of the granular confined system. (C) The complete set of pattern classes assembled out of 1,200 experiments with different confinement rates . The classes are listed in order of descending occurrence probability . The particles are connected by Delaunay triangles, their color highlighting the shells (outer, blue; middle, green; inner, yellow) in the patterns.