docs/decisions/0002-non-rigid-steps.md
243 lines · 15892 bytes
7 symbols in this file
1# 0002 — Non-rigid steps and the remaining coupled steps
2
3**Status:** decided 2026-10-19, as recommended:
4
5- the petal fold is rigid (M2);
6- reverse folds and sinks are flagged and use open, pop, close, with the flap
7 opened to 30° from flat by default;
8- the bound is 10% largest edge strain on the render mesh;
9- the sampan's and the masu's last steps, and the crane's preliminary base,
10 are classified when they are authored (Task 15).
11
12The plan is amended accordingly; the non-rigid path is Task 7b.
13
14Follows `0001-interpolation-model.md` (option A). Spike:
15`swift run -c release --package-path spikes/interpolation bending` (case 6) and
16`… petal2` (case 7).
17
18## Case 7 — the petal fold is rigid
19
20**Source.** The bird base inside Origami Simulator's
21`assets/Origami/flat_crane.svg` (github.com/amandaghassaei/OrigamiSimulator,
22MIT). The file's coordinates are hand-drawn to about 1e-3, so the pattern was
23rebuilt exactly from its structure rather than snapped:
24
25- the midline cross from the centre to the four kite ends, mountain;
26- the diagonal the preliminary base folds, valley;
27- the eight 22.5° kite creases from the corners, mountain;
28- the two petal hinges joining the kite ends, valley.
29
30The outer midline segments, from each kite end to the edge, are folded in
31the preliminary base and flat in the bird base, so they are edges of the
32pattern, unfolded by the petal fold. The other diagonal is not creased at
33all. 0001's case 5 used a different pattern — no unfolding of the outer
34segments, plus an inner square — and its petal lifted the inner layers'
35corners too.
36
37**Checks.** The preliminary base (full midlines mountain, diagonal valley)
38and the bird base after the front petal fold are both flat-foldable:
39Kawasaki and Maekawa hold at every interior vertex, and both close with gap
40under 4e-16.
41
42**Motion.** The hinge is driven 0° → 180°. Ten of the thirteen static
43creases go on the spanning tree first; the other three are off it and held
44by closure. Of the six moving creases (four kites, two outer segments),
45four are solved on the tree and two measured. Every crease, static ones
46included, ends within 1e-3° of the bird base.
47
48- rigid: gap 1e-12, and it reaches the bird base;
49- no collisions between t = 0.05 and 0.95;
50- the outer midline segments *unfold* (−180° → 0°) while the hinge and
51 kites fold;
52- the angles are coupled nonlinearly: at hinge 45°, 90° and 135°, the kites
53 are at −18.0°, −41.9° and −85.5°. Linear angles tear it by 0.18 on a unit
54 sheet;
55- the traced points behave like a petal fold: the front point swings up past
56 the centre, the side corners come to the centre line, and the leg corners
57 stay down.
58
59**Classification:** rigid, M2 with solved curves. Not flagged.
60
61Two lessons for the code:
62
63- Creases that should hold still must be on the spanning tree where
64 possible. A crease off the tree is held only by vertex closure, so a
65 static region whose tree path runs through moving creases can rotate. With
66 the static creases put on the tree first, the spurious mid-motion
67 collisions disappeared. `foldc`'s region tree (plan, Task 7) holds static
68 creases rigidly.
69- Collisions are still reported at exactly t = 1, six pairs, where faces
70 land on stacks; they were not examined further. The plan sets each step's
71 last sample to the end frame exactly, and makes Task 6's coplanar
72 tolerance as wide as the isometry tolerance.
73
74## Case 6 — the reverse fold needs the flap opened nearly flat
75
76Case 4's two-layer flap (4×2, spine y = 1). The end pose is the reverse
77fold's coordinates. Inside, outside and folded-over reverse folds share
78those coordinates, so the path decides which one it is.
79
80**Extra straight creases** were argued against, not measured. A straight
81crease that meets the spine elsewhere makes another degree-4 vertex with a
82straight pair, with the same obstruction as case 4. A fan of creases from
83the existing vertex raises its degree and adds freedom that this argument
84does not cover. The spike went to bending instead.
85
86**Direct ARAP interpolation** (each small triangle's rotation slerped from
87the closed flap to the reverse fold, positions by least squares, mesh
88spacing 0.25 and 0.125): strain 68–82%, collision at s = 0.03. Rotations
89near 180° make slerp ill-posed; this is not a usable model.
90
91**Open, pop, close.** Three phases:
92
931. Open the flap rigidly to angle φ on its spine, with the tip still
94 pointing out.
952. Pop the tip inside with the flap held at φ. This is the only non-rigid
96 phase, ARAP between two rigid poses.
973. Close rigidly on the reverse-fold branch.
98
99Closing is rigid (gap 1e-13). No collision was found in it, checking every
100sample except the last three, where faces land. Just before landing, the
101tip lies between the body's layers: an inside reverse fold. The pop's
102largest edge strain:
103
104| flap opened to φ | mesh 0.25 | mesh 0.125 | pop collision |
105|---|---|---|---|
106| 170° (nearly closed) | 64% | 76% | yes |
107| 150° | 53% | 62% | yes |
108| 120° | 58% | 58% | none |
109| 90° | 49% | 56% | none |
110| 60° | 25% | 29% | none |
111| 30° | 6.8% | 7.9% | none |
112| 10° (nearly flat) | 0.8% | 0.9% | none |
113
114The largest strain beyond 0.25 and beyond 0.5 of the vertex equals the
115largest overall, so it is not concentrated at the vertex. It runs along the
116tip, because each tip face is moved as a whole.
117
118Iterative ARAP, with only the tip's far corners guided and only on the 0.25
119mesh, gave lower strain at 170° and 150° (41%, 43%), the same at 120°–30°,
120and 0.91% against 0.77% at 10°. The guided corners carry the distortion. A
121pop optimised for least strain was not measured, and might do better at
122moderate openings.
123
124Opening the flap to about 30° from flat is how beginners' diagrams teach
125the inside reverse fold: open the layers, push the point in, flatten.
126
127**Limits.**
128
129- One two-layer 4×2 flap, at two resolutions; strain rose with refinement
130 (6.8% → 7.9% at 30°).
131- The crane's flaps are narrower and several layers deep, and the render
132 mesh's spacing is 1/32 of the whole sheet, so a neck flap gets few cells
133 across.
134- Opening a multi-layer flap to 30° may disturb earlier layers; that is
135 0001's "not measured on the crane's geometry" again.
136- Only the inside reverse fold was measured; outside reverse folds and sinks
137 are expected to fit the same model.
138
139Task 15 records each flagged step's strain.
140
141## Not measured
142
143- **Sampan, turning inside out.** No crease pattern was found for the
144 traditional sampan with its mountain and valley assignment, and the
145 published sequences differ. The inversion has no spine for a flap to
146 open on, so open, pop, close does not obviously apply.
147- **Masu, raising the walls.** Not built. The pattern is well known; the
148 wall-raising step would need its own construction.
149- **The crane's preliminary base.** 0001 listed its collapse (or the squash
150 folds that can replace it) as coupled. Not measured. A squash fold opens a
151 flap on a spine, as a reverse fold does, so the plan has the crane collapse
152 the preliminary base from a pre-creased square instead.
153
154When a model is authored, classifying a step uses:
155
156- `foldc`'s closure test — a loop that does not close fails the step;
157- the interpenetration check;
158- the validator's layer rules;
159- a look in the app.
160
161Closure alone is not enough: a solver that fails to converge does not prove
162there is no rigid motion, and case 4(a) shows closure succeeding on a branch
163with the wrong layering. That is why a reverse fold is flagged by its script
164naming a spine, not by the solver.
165
166## Recommendation
167
1681. **Petal folds are rigid** (M2). Only reverse folds and sinks are flagged,
169 by naming the spine their flap opens on. Sinks have the same structure as
170 reverse folds and are expected to use the same model; that is not
171 measured.
1722. **Non-rigid model: open, pop, close**, with φ authored per step and
173 defaulting to 30° from flat. `krz:step` gains, for a flagged step:
174 - the spine;
175 - φ;
176 - the two phase boundaries on *t* (default ⅓, ⅔);
177 - the opening axes;
178 - the popped pose;
179 - the closing axes and curves, as for a rigid step.
180
181 The pop runs ARAP on a render mesh built as the spike built it: frame 0's
182 creases plus lines every 1/32 of its longer side in each direction. The
183 mesh is the renderer's, not the file's; the FOLD topology is unchanged.
1843. **Bound:** the largest relative change in any render-mesh edge length
185 during the pop, at most **10%**. Measured 7.9% at the default φ, on the
186 case 6 flap only. Task 8 checks it for every flagged step, alongside the
187 interpenetration check on the mesh.
1884. **Sampan, masu and the crane's preliminary base:** classify each when it
189 is authored in Task 15, as above. If one is not rigid and open, pop, close
190 does not fit it, stop there for a model of its own.
191
192## Decisions for the author
193
194All three made on 2026-10-19: 10% at φ = 30°; sampan and masu classified at
195authoring time. Removing the overlapping-moving-sets rule for
196`krz:faceOrders_midFold` (from 0001) is still open.
197
198## Appendix: spike output
199
200```
201## Case 6 — inside reverse fold with bending (as-rigid-as-possible interpolation)
202- end pose gap 4.44e-16: the reverse fold's coordinates; inside, outside and folded-over share them, so the path decides which
203- mesh spacing 0.25: 153 vertices, 256 triangles
204 - 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)
205 - 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)
206 - 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)
207 - 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)
208 - 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)
209 - 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)
210 - 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)
211 - 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)
212- mesh spacing 0.125: 561 vertices, 1024 triangles
213 - 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)
214 - 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)
215 - 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)
216 - 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)
217 - 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)
218 - 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)
219 - 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)
220 - 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)
221
222## Case 7 — petal fold on the bird base from Origami Simulator's flat crane
223- tree: 10 of 13 static creases, 4 of 6 moving creases solved, the rest measured
224- preliminary base: gap 1.57e-16; Kawasaki and Maekawa hold at every interior vertex
225- after the front petal fold: gap 3.34e-16; Kawasaki and Maekawa hold at every interior vertex
226- 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
227 - collisions with t in 0.05…0.95, away from the coincident start and end: none
228 - 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)
229 - 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
230 - M1, every angle linear to the same end: max gap 1.82e-1
231 - front point (0,0): (1.0, 1.0, 0) → (0.646, 0.646, -0.5) → (0.293, 0.293, 0)
232 - side corner (0.5,0): (1.0, 0.5, 0) → (0.955, 0.519, -0.128) → (0.646, 0.646, 0)
233 - leg corner (1,0): (1.0, 1.0, 0) → (1.0, 1.0, 0) → (1.0, 1.0, 0)
234- 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
235 - collisions with t in 0.05…0.95, away from the coincident start and end: none
236 - 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)
237 - 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
238 - M1, every angle linear to the same end: max gap 1.82e-1
239 - front point (0,0): (1.0, 1.0, 0) → (0.646, 0.646, -0.5) → (0.293, 0.293, 0)
240 - side corner (0.5,0): (1.0, 0.5, 0) → (0.955, 0.519, -0.128) → (0.646, 0.646, 0)
241 - leg corner (1,0): (1.0, 1.0, 0) → (1.0, 1.0, 0) → (1.0, 1.0, 0)
242
243```