# 0002 — Non-rigid steps and the remaining coupled steps **Status:** decided 2026-10-19, as recommended: - the petal fold is rigid (M2); - reverse folds and sinks are flagged and use open, pop, close, with the flap opened to 30° from flat by default; - the bound is 10% largest edge strain on the render mesh; - the sampan's and the masu's last steps, and the crane's preliminary base, are classified when they are authored (Task 15). The plan is amended accordingly; the non-rigid path is Task 7b. Follows `0001-interpolation-model.md` (option A). Spike: `swift run -c release --package-path spikes/interpolation bending` (case 6) and `… petal2` (case 7). ## Case 7 — the petal fold is rigid **Source.** The bird base inside Origami Simulator's `assets/Origami/flat_crane.svg` (github.com/amandaghassaei/OrigamiSimulator, MIT). The file's coordinates are hand-drawn to about 1e-3, so the pattern was rebuilt exactly from its structure rather than snapped: - the midline cross from the centre to the four kite ends, mountain; - the diagonal the preliminary base folds, valley; - the eight 22.5° kite creases from the corners, mountain; - the two petal hinges joining the kite ends, valley. The outer midline segments, from each kite end to the edge, are folded in the preliminary base and flat in the bird base, so they are edges of the pattern, unfolded by the petal fold. The other diagonal is not creased at all. 0001's case 5 used a different pattern — no unfolding of the outer segments, plus an inner square — and its petal lifted the inner layers' corners too. **Checks.** The preliminary base (full midlines mountain, diagonal valley) and the bird base after the front petal fold are both flat-foldable: Kawasaki and Maekawa hold at every interior vertex, and both close with gap under 4e-16. **Motion.** The hinge is driven 0° → 180°. Ten of the thirteen static creases go on the spanning tree first; the other three are off it and held by closure. Of the six moving creases (four kites, two outer segments), four are solved on the tree and two measured. Every crease, static ones included, ends within 1e-3° of the bird base. - rigid: gap 1e-12, and it reaches the bird base; - no collisions between t = 0.05 and 0.95; - the outer midline segments *unfold* (−180° → 0°) while the hinge and kites fold; - the angles are coupled nonlinearly: at hinge 45°, 90° and 135°, the kites are at −18.0°, −41.9° and −85.5°. Linear angles tear it by 0.18 on a unit sheet; - the traced points behave like a petal fold: the front point swings up past the centre, the side corners come to the centre line, and the leg corners stay down. **Classification:** rigid, M2 with solved curves. Not flagged. Two lessons for the code: - Creases that should hold still must be on the spanning tree where possible. A crease off the tree is held only by vertex closure, so a static region whose tree path runs through moving creases can rotate. With the static creases put on the tree first, the spurious mid-motion collisions disappeared. `foldc`'s region tree (plan, Task 7) holds static creases rigidly. - Collisions are still reported at exactly t = 1, six pairs, where faces land on stacks; they were not examined further. The plan sets each step's last sample to the end frame exactly, and makes Task 6's coplanar tolerance as wide as the isometry tolerance. ## Case 6 — the reverse fold needs the flap opened nearly flat Case 4's two-layer flap (4×2, spine y = 1). The end pose is the reverse fold's coordinates. Inside, outside and folded-over reverse folds share those coordinates, so the path decides which one it is. **Extra straight creases** were argued against, not measured. A straight crease that meets the spine elsewhere makes another degree-4 vertex with a straight pair, with the same obstruction as case 4. A fan of creases from the existing vertex raises its degree and adds freedom that this argument does not cover. The spike went to bending instead. **Direct ARAP interpolation** (each small triangle's rotation slerped from the closed flap to the reverse fold, positions by least squares, mesh spacing 0.25 and 0.125): strain 68–82%, collision at s = 0.03. Rotations near 180° make slerp ill-posed; this is not a usable model. **Open, pop, close.** Three phases: 1. Open the flap rigidly to angle φ on its spine, with the tip still pointing out. 2. Pop the tip inside with the flap held at φ. This is the only non-rigid phase, ARAP between two rigid poses. 3. Close rigidly on the reverse-fold branch. Closing is rigid (gap 1e-13). No collision was found in it, checking every sample except the last three, where faces land. Just before landing, the tip lies between the body's layers: an inside reverse fold. The pop's largest edge strain: | flap opened to φ | mesh 0.25 | mesh 0.125 | pop collision | |---|---|---|---| | 170° (nearly closed) | 64% | 76% | yes | | 150° | 53% | 62% | yes | | 120° | 58% | 58% | none | | 90° | 49% | 56% | none | | 60° | 25% | 29% | none | | 30° | 6.8% | 7.9% | none | | 10° (nearly flat) | 0.8% | 0.9% | none | The largest strain beyond 0.25 and beyond 0.5 of the vertex equals the largest overall, so it is not concentrated at the vertex. It runs along the tip, because each tip face is moved as a whole. Iterative ARAP, with only the tip's far corners guided and only on the 0.25 mesh, gave lower strain at 170° and 150° (41%, 43%), the same at 120°–30°, and 0.91% against 0.77% at 10°. The guided corners carry the distortion. A pop optimised for least strain was not measured, and might do better at moderate openings. Opening the flap to about 30° from flat is how beginners' diagrams teach the inside reverse fold: open the layers, push the point in, flatten. **Limits.** - One two-layer 4×2 flap, at two resolutions; strain rose with refinement (6.8% → 7.9% at 30°). - The crane's flaps are narrower and several layers deep, and the render mesh's spacing is 1/32 of the whole sheet, so a neck flap gets few cells across. - Opening a multi-layer flap to 30° may disturb earlier layers; that is 0001's "not measured on the crane's geometry" again. - Only the inside reverse fold was measured; outside reverse folds and sinks are expected to fit the same model. Task 15 records each flagged step's strain. ## Not measured - **Sampan, turning inside out.** No crease pattern was found for the traditional sampan with its mountain and valley assignment, and the published sequences differ. The inversion has no spine for a flap to open on, so open, pop, close does not obviously apply. - **Masu, raising the walls.** Not built. The pattern is well known; the wall-raising step would need its own construction. - **The crane's preliminary base.** 0001 listed its collapse (or the squash folds that can replace it) as coupled. Not measured. A squash fold opens a flap on a spine, as a reverse fold does, so the plan has the crane collapse the preliminary base from a pre-creased square instead. When a model is authored, classifying a step uses: - `foldc`'s closure test — a loop that does not close fails the step; - the interpenetration check; - the validator's layer rules; - a look in the app. Closure alone is not enough: a solver that fails to converge does not prove there is no rigid motion, and case 4(a) shows closure succeeding on a branch with the wrong layering. That is why a reverse fold is flagged by its script naming a spine, not by the solver. ## Recommendation 1. **Petal folds are rigid** (M2). Only reverse folds and sinks are flagged, by naming the spine their flap opens on. Sinks have the same structure as reverse folds and are expected to use the same model; that is not measured. 2. **Non-rigid model: open, pop, close**, with φ authored per step and defaulting to 30° from flat. `krz:step` gains, for a flagged step: - the spine; - φ; - the two phase boundaries on *t* (default ⅓, ⅔); - the opening axes; - the popped pose; - the closing axes and curves, as for a rigid step. The pop runs ARAP on a render mesh built as the spike built it: frame 0's creases plus lines every 1/32 of its longer side in each direction. The mesh is the renderer's, not the file's; the FOLD topology is unchanged. 3. **Bound:** the largest relative change in any render-mesh edge length during the pop, at most **10%**. Measured 7.9% at the default φ, on the case 6 flap only. Task 8 checks it for every flagged step, alongside the interpenetration check on the mesh. 4. **Sampan, masu and the crane's preliminary base:** classify each when it is authored in Task 15, as above. If one is not rigid and open, pop, close does not fit it, stop there for a model of its own. ## Decisions for the author All three made on 2026-10-19: 10% at φ = 30°; sampan and masu classified at authoring time. Removing the overlapping-moving-sets rule for `krz:faceOrders_midFold` (from 0001) is still open. ## Appendix: spike output ``` ## Case 6 — inside reverse fold with bending (as-rigid-as-possible interpolation) - end pose gap 4.44e-16: the reverse fold's coordinates; inside, outside and folded-over share them, so the path decides which - mesh spacing 0.25: 153 vertices, 256 triangles - direct, closed flap → reverse fold: max strain 68.37%; collision at s = 0.033; at s = 0.97 the tip is between the body's layers (inside) - open to 170.0°, pop, close: iterative ARAP pop strain 41.47%; pop strain 63.69% (beyond 0.25 of the vertex 63.69%, beyond 0.5 63.69%), pop collision at s = 0.067; closing gap 2.49e-13, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 150.0°, pop, close: iterative ARAP pop strain 43.1%; pop strain 52.71% (beyond 0.25 of the vertex 52.71%, beyond 0.5 52.71%), pop collision at s = 0.233; closing gap 9.76e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 120.0°, pop, close: iterative ARAP pop strain 58.18%; pop strain 58.18% (beyond 0.25 of the vertex 58.18%, beyond 0.5 58.18%), pop collision none; closing gap 9.26e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 90.0°, pop, close: iterative ARAP pop strain 48.97%; pop strain 48.97% (beyond 0.25 of the vertex 48.97%, beyond 0.5 48.97%), pop collision none; closing gap 9.97e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 60.0°, pop, close: iterative ARAP pop strain 25.34%; pop strain 25.34% (beyond 0.25 of the vertex 25.34%, beyond 0.5 25.34%), pop collision none; closing gap 9.63e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 30.0°, pop, close: iterative ARAP pop strain 6.81%; pop strain 6.81% (beyond 0.25 of the vertex 6.81%, beyond 0.5 6.81%), pop collision none; closing gap 9.67e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 10.0°, pop, close: iterative ARAP pop strain 0.91%; pop strain 0.77% (beyond 0.25 of the vertex 0.77%, beyond 0.5 0.77%), pop collision none; closing gap 9.66e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - mesh spacing 0.125: 561 vertices, 1024 triangles - direct, closed flap → reverse fold: max strain 81.63%; collision at s = 0.033; at s = 0.97 the tip is between the body's layers (inside) - open to 170.0°, pop, close: pop strain 75.84% (beyond 0.25 of the vertex 75.84%, beyond 0.5 75.84%), pop collision at s = 0.05; closing gap 2.49e-13, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 150.0°, pop, close: pop strain 62.27% (beyond 0.25 of the vertex 62.27%, beyond 0.5 62.27%), pop collision at s = 0.15; closing gap 9.76e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 120.0°, pop, close: pop strain 58.47% (beyond 0.25 of the vertex 58.47%, beyond 0.5 58.47%), pop collision none; closing gap 9.26e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 90.0°, pop, close: pop strain 55.89% (beyond 0.25 of the vertex 55.89%, beyond 0.5 55.89%), pop collision none; closing gap 9.97e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 60.0°, pop, close: pop strain 29.3% (beyond 0.25 of the vertex 29.3%, beyond 0.5 29.3%), pop collision none; closing gap 9.63e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 30.0°, pop, close: pop strain 7.88% (beyond 0.25 of the vertex 7.88%, beyond 0.5 7.88%), pop collision none; closing gap 9.67e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) - open to 10.0°, pop, close: pop strain 0.89% (beyond 0.25 of the vertex 0.89%, beyond 0.5 0.89%), pop collision none; closing gap 9.66e-14, collision none, reaches the end pose true; just before landing the tip is between the body's layers (inside) ## Case 7 — petal fold on the bird base from Origami Simulator's flat crane - tree: 10 of 13 static creases, 4 of 6 moving creases solved, the rest measured - preliminary base: gap 1.57e-16; Kawasaki and Maekawa hold at every interior vertex - after the front petal fold: gap 3.34e-16; Kawasaki and Maekawa hold at every interior vertex - M2, hinge 0 → 180 driven, 4 creases solved (kites seeded mountain): max gap 9.96e-13; collision at t = 1.0; front kites -180.0…0, -180.0…0; inner kites -180.0…0, -180.0…0; outer midline segments -180.0…0, -180.0…0; reaches the bird base: true - collisions with t in 0.05…0.95, away from the coincident start and end: none - first colliding faces at t = 1.0, by centroid on the sheet: (0.67, 0.07)×(0.76, 0.33), (0.67, 0.07)×(0.67, 0.24), (0.67, 0.07)×(0.76, 0.76), (0.07, 0.33)×(0.24, 0.67), (0.07, 0.33)×(0.33, 0.76), (0.07, 0.33)×(0.24, 0.24) - front kite, inner kite, outer segment at t = 0.25: -18.0, -18.0, -135.0; 0.5: -41.9, -41.9, -90.0; 0.75: -85.5, -85.5, -45.0 - M1, every angle linear to the same end: max gap 1.82e-1 - front point (0,0): (1.0, 1.0, 0) → (0.646, 0.646, -0.5) → (0.293, 0.293, 0) - side corner (0.5,0): (1.0, 0.5, 0) → (0.955, 0.519, -0.128) → (0.646, 0.646, 0) - leg corner (1,0): (1.0, 1.0, 0) → (1.0, 1.0, 0) → (1.0, 1.0, 0) - M2, hinge 0 → 180 driven, 4 creases solved (kites seeded valley): max gap 9.96e-13; collision at t = 1.0; front kites -180.0…0, -180.0…0; inner kites -180.0…0, -180.0…0; outer midline segments -180.0…0, -180.0…0; reaches the bird base: true - collisions with t in 0.05…0.95, away from the coincident start and end: none - first colliding faces at t = 1.0, by centroid on the sheet: (0.67, 0.07)×(0.76, 0.33), (0.67, 0.07)×(0.67, 0.24), (0.67, 0.07)×(0.76, 0.76), (0.07, 0.33)×(0.24, 0.67), (0.07, 0.33)×(0.33, 0.76), (0.07, 0.33)×(0.24, 0.24) - front kite, inner kite, outer segment at t = 0.25: -18.0, -18.0, -135.0; 0.5: -41.9, -41.9, -90.0; 0.75: -85.5, -85.5, -45.0 - M1, every angle linear to the same end: max gap 1.82e-1 - front point (0,0): (1.0, 1.0, 0) → (0.646, 0.646, -0.5) → (0.293, 0.293, 0) - side corner (0.5,0): (1.0, 0.5, 0) → (0.955, 0.519, -0.128) → (0.646, 0.646, 0) - leg corner (1,0): (1.0, 1.0, 0) → (1.0, 1.0, 0) → (1.0, 1.0, 0) ```