# Hexagon study Public study: https://frank.egor.lol/lab/hexagon-study. Studio 3000 × Lyfar Studio. A separate visual composition study sharing its tile renderer with the [flip wall](flip-wall.md). ## Use The paged, searchable library shows twelve thumbnails at a time. The initial wall mixes 36 star and block designs and coordinated original fabric prints. Select several families to restrict the mix; at least one remains selected. Shuffle stars and reshuffle fabrics operate separately. Tap a hexagon to edit only that tile; choose its star, rotate it, change its centre size or twist. “Edit whole wall” returns to the multi-selection. “Repeat across wall” takes the selected star and its geometry to every tile. “Mix all stars” restores all 36 designs. Composition selects Mixed patchwork, Seven-star rosettes, Concentric hexagons, Chevron bands, Diagonal ribbons or Kaleidoscope. Pattern assignments, shared material seeds and tile orientation follow that rule. Changing the composition clears per-tile edits. Patchwork uses a seeded shuffled bag so every selected design appears before repetition. Rosettes use an index-seven sublattice: each centre owns its six neighbors. Kaleidoscope maps axial coordinates to a canonical D6 orbit and applies the inverse rotation/reflection to the complete textured tile; it preserves the geometry and prints under those symmetries. Rings and bands coordinate both design and fabric. One hexagon provides a larger view of the selected tile. Arrow keys select tiles, Enter/Space switch the view, Escape returns to whole-wall editing. Pointer scrolling on phones remains native. The canvas precedes the controls on phones; the desktop preview stays beside them. Fabric collections: Festival, Cobalt & gold, Hong Kong nights (original abstract façade/window, water-reflection and illuminated-frame prints), Ink & paper, Cherry red & white. These are generated prints, not photographs of Hong Kong. Repeat mode reuses the crop for a piece role and rotates it around the star; Mirror reflects alternate sectors; Different crops varies each sector. Print scale and fine seams are adjustable. Show the pieces reveals the geometry without textures. JPG, PNG and WebP uploads replace the built-in prints in memory. One to eight files, maximum 12 MB each, decoded sequentially and resized to at most 1024 px per edge. Images never leave the browser or enter storage. Reload clears them. A failed batch preserves the previous set. “Use fabrics again” releases the uploaded surfaces. Save PNG exports the current wall or selected hexagon at up to 2400 px wide (12 megapixel cap for tall walls), without the editing outline. Layout changes reset per-tile edits because the grid keys change. Rows 3–12, columns 3–10. The crop includes partial edge hexagons, like a piece cut from a larger quilt. The flip-wall link carries a single star or the full mixed catalog, fabric collection and material seed. Custom image files, arbitrary subsets and geometry adjustments remain in the study. The link selects hexagons at a readable lower density; the normal flip-wall URL retains its previous defaults. In the flip wall, “Hexagon star” appears whenever Hexagon is selected. Plain is the normal default. The star texture follows the front face in both flat and photo views; the reverse retains the configured solid colour. Existing binary text/pattern animation, autoplay and shape mixing are preserved. ## Book projects The gallery reconstructs seven project layouts from the supplied EPUB, using the editable 36-design catalog in place of the book's specific numbered star interiors. Stars and connectors are separate geometric pieces; no quilt scan is used as a background or texture. Selecting a project applies its layout and suggested palette, preserves the chosen star mix and uploaded images, and clears per-star edits. “Free wall” restores the adjustable rectangular grid. Projects keep their block counts and outline while stars, prints, scale, gaps and seams remain editable. PNG export includes the whole assembly. `?project=chart` (or another gallery ID) opens a preset directly; the URL shares the preset, not subsequent edits or images. The flip-wall link carries star faces and fabrics, not a project's connectors or arrangement. | Project / URL ID | Layout | EPUB locator | | --- | --- | --- | | Mandala Candle Mat / `mandala` | 1 star, 6 squares, 12 equilateral triangles | chapter08, f047-01 | | Starlight Sisters / `sisters` | 7 stars, 12 squares, 12 equilateral triangles | chapter09, f049-01 | | Windward / `windward` | 11 stars, 10 diamonds, 46 equilateral triangles | chapter10, f051-01 | | Neutron Stars / `neutron` | 36 stars in six staggered columns, 84 equilateral triangles, 20 split-diamond pieces, 8 half-triangles | chapter11, f054-01 | | Cherry Pie in the Sky / `cherry` | 42 stars; central twelve-arm medallion with 6 pieced spacer hexagons, 12 squares, 18 equilateral triangles, 18 regular and 24 narrow diamonds; adapted outer clusters | chapter12, f058-01, f058-06, f059-01, f061-01 | | Star Chart / `chart` | 36 stars, 48 square links, 46 equilateral triangles; nine large openings and four small openings on a three-panel ground | chapter13, f066-01; f069-01 is the quilting guide | | Free Luncheon Leftovers / `luncheon` | 22 stars, checkerboard border panels and two small orphan-block rosettes | chapter14, f073-02 | Windward has a source discrepancy: the chapter text lists 44 setting triangles; the labelled assembly diagram has 46 (10 small top/bottom pieces, A–L, two sets of M–S and X–Z, plus four `ff` pieces). This reconstruction follows the diagram. Neutron Stars' introductory list says 16 star blocks, while its instructions and diagram specify a 6 × 6 layout; this study follows the 36-block layout. The first four layouts and Star Chart reconstruct the assembly geometry. Cherry Pie retains the central construction but regularizes the optional, asymmetrical outer extensions; its card explicitly calls them adapted clusters. Luncheon uses the diagram's star landmarks and checker panels with original prints, a simplified quilting line and reinterpreted vintage linens. These are visual studies, not dimensioned sewing templates or reproductions of all the book's numbered stars. ## Geometry and ownership `physics-lab/hexagon-study/catalog.ts`: the 36 design recipes. `geometry.ts`: pure unit-hexagon partition and staggered lattice. `layouts.ts`: whole-wall pattern rules, seven-cell rosettes and D6 orbit transforms. `project-geometry.ts`: unit-edge setting pieces, transformed stars and assembly bounds. `projects.ts` / `project-cherry.ts`: book layout builders and catalog. `project-render.ts`: clipped fabrics on setting pieces and original vector gallery previews. `composition.ts`: deterministic wall recipes and per-tile edits. `materials.ts`: original seeded print swatches and bounded local-image decoding. `tiles.ts`: cached textured tile faces, shared with the flip wall. `projected.ts`: affine triangular texture mapping into the photo wall. `render.ts`: static wall/single-tile composition. `main.ts`: controls, upload/export and redraw lifecycle. The point-up hexagon has vertices `(cos(-π/2 + kπ/3), sin(-π/2 + kπ/3))`. For n star tips, rays intersect its boundary exactly; a smaller regular n-gon supplies the centre. Each arm joins one boundary tip to two adjacent centre vertices. Each background piece follows the remaining outer boundary arc, including hexagon corners. These pieces and the centre partition the hexagon. Split arms, a recursively partitioned central hexagon and a border band create further families. Additional constructions include centreless diamond/kite stars, six separately pieced triangular wedges, three rhombi with affine subdivisions, and convex half-plane cuts forming triangle/ribbon lattices. Centre radius and twist are bounded to preserve noncrossing regions. The three-face Prism has fixed geometry; its individual geometry sliders are disabled. Four-, five-, eight- and twelve-point stars retain a hexagonal outer boundary rather than changing the tiling. Point-up hexagon centres use `x = √3 × (column + 0.5 × rowParity)`, `y = 1.5 × row`. The rectangle is covered by full and partial edge cells before adding the chosen gaps. Geometric invariants check all 36 designs at every combination of slider extremes: finite in-bounds vertices, positive piece area, total area equal to `3√3/2`, and random-point single coverage. Separate fixtures check the wall crop, deterministic isolated edits, complete seven-cell groups, and all twelve rotations/reflections plus their inverse coordinate transforms. Project assemblies use unit-radius hexagons with explicit position, angle and optional scale. Squares and equilateral triangles are erected on hexagon edges; Windward fills a triangular lattice outside its hexagons and diamonds. Star Chart joins selected hexagon centres at distance `√3 + 1` with unit squares, preserving the empty regions. Setting pieces and star faces share the fabric generator and local photos. A separating-axis test checks every pair of convex pieces in every project for overlapping interiors; further fixtures check source counts, edge lengths, in-bounds geometry and isolated editing. Browser checks exercise every preset, deep links, pointer/keyboard selection, mobile controls, material changes and actual PNG downloads. No animation loop runs in the static study. Redraws are coalesced with requestAnimationFrame, stopped when hidden. Print and tile caches are bounded. The flip wall precomputes 36 distinct 128 px faces in mixed mode, or 24 fabric variants of one design on a pattern change; flips only transform cached surfaces. Perspective mapping uses six affine triangles per face, a visual approximation to perspective-correct texture interpolation. The original mockup photograph and its calibrated camera remain unchanged. ## Sources and scope Read from the user-supplied EPUB: Cathy Perlmutter, *Hexagon Star Quilts: 113 English Paper-Pieced Star Patterns to Piece and Appliqué*. `OEBPS/Text/chapter01.xhtml` (How to Fussy-Cut) explains repeated identical selections of a print for kaleidoscopic effects. `chapter18.xhtml` and `f077-02.jpg` show diamond pieces meeting at a centre (Star 7). `chapter55.xhtml` / `f114-01.jpg` show the three-part triangular constructions of Stars 81/82. `chapter61.xhtml` / `f120-01.jpg` show differently arranged triangular wedges in Stars 93/94. `chapter30.xhtml` and `f089-01.jpg` show Stars 31/32 with a central polygon, surrounding pointed pieces and intervening background pieces. `part02.xhtml` (Design Your Own Quilts) develops compositions from hexagons, triangles, diamonds, squares and related pieces. These principles informed the implementation; the 36 named designs are programmatic constructions and variations, not a digitization of all 113 numbered templates. The book, its page scans and its fabric photographs are not distributed with the app. Book SHA-256: `d18126115e1e78a43a2f01495a7430b6c0a231df71b29599b648e294dd71a19d`. Local source locators and excerpts are retained under `evidence/physics-lab/hexagon-study/`, outside the deployed bundle. Grid background: Amit Patel, [Hexagonal Grids](https://www.redblobgames.com/grids/hexagons/), especially point-up spacing and offset coordinates (accessed 5 November 2026). The partition algorithm is implemented here and checked numerically, not attributed to that grid guide. The local corpus also contains geometric-pattern references (including Chinese lattice and Islamic geometric pattern collections), and a second local book, *The New Hexagon*, exists. Those have not been used as verified pattern sources for this version. The project setting geometry provides a foundation for future Hong Kong compositions; this version has the abstract Hong Kong fabric collection, not a city skyline or a real transit map. ## Verification `bun run lab:test`, `bun run lab:build`, `bun run lab:e2e hexagon-study.spec.ts flip-wall.spec.ts flip-wall-autoplay.spec.ts`. Geometry fixtures: `physics-lab/tests/hexagon-study.test.ts`. Browser checks cover catalog paging/search, all six composition modes, mixed defaults, isolated tile editing, geometry, texture modes, upload failure recovery, PNG output, narrow layouts, keyboard controls and flip-wall integration in flat/photo views. Automated phone profiles are not physical-device acceptance. Like the other lab studies, this builds only into `.private/physics-lab`, packages separately and is allowlisted by the lab Worker. No lookbook imports or service-worker caching.