docs/authoring/box.md

main
fold/docs/authoring/box.md rendered · source · history · blame · raw

130 lines · 6890 bytes

5 symbols in this file

Box

The traditional masu. Twelve steps: four fold-and-unfolds, six folds, and two coupled folds with solved curves (steps 9 and 11) that raise the end walls. No non-rigid steps. The model ends standing as a box, not flat.

Models/box-cp.fold and Models/box.foldscript compile to Packages/FoldKit/Sources/Models/Resources/box.fold:

swift run --package-path Packages/FoldKit foldc Models/box.foldscript \
  -o Packages/FoldKit/Sources/Models/Resources/box.fold

everyShippedModelRegeneratesFromItsScript checks that the shipped file is what the script compiles to.

Sequence and source

The traditional masu as it is usually taught: crease the diagonals, blintz, fold the edges to the centre and unfold both ways, open two opposite corners, raise the sides, raise each end while pushing its corners in, and fold the end flap over the wall into the box. In this variant the sides are raised straight to 90°, not first folded to the centre, and both sides are raised before either end.

  1. Fold and unfold the diagonal y = 2, bottom corner to top.
  2. Fold and unfold the diagonal x = 2, left corner to right.
  3. Fold the bottom and top corners to the centre (two axes).
  4. Fold the left and right corners to the centre (two axes).
  5. Fold and unfold the top and bottom edges to the centre line (y′ = 2.5 and 1.5 through all layers; two axes).
  6. Fold and unfold the left and right edges to the centre line (x′ = 1.5 and 2.5; two axes).
  7. Unfold the top and bottom corners (angles 180 → 0).
  8. Raise the left and right sides to 90°.
  9. Raise the top end to 90°, the corners folding in against it (coupled).
  10. Fold the top flap over the wall and down into the box.
  11. Raise the bottom end in the same way (repeatOf 9).
  12. Fold the bottom flap into the box (repeatOf 10).

Viewpoints: eye (0, 0, 1), up (0, 1, 0) for steps 1–7; eye (1, −2, 2), up (0, 1, 0) for steps 8–10; eye (1, 2, 2), up (0, −1, 0) for steps 11–12, so that each end is raised on the far side of the box. Neither oblique eye lies in the plane of any wall, so no face is seen edge-on.

At step 11 the viewpoint moves round to the other end of the box, eye (1, −2, 2) to (1, 2, 2) and up (0, 1, 0) to (0, −1, 0), so the view turns 180°: the camera moves and the model does not. This is an authored exception to "the model reorients, not the camera". A rotate step turns the model about the view direction, so at an oblique viewpoint with the walls standing a 180° rotate would tilt the box off the table instead of turning it round on it, and a turn-over would put it upside down. Changing the eye and up vectors at step 11 brings the bottom end to the far side without moving the paper.

Crease pattern

Constructed from the sequence above, not taken from a published crease pattern. The sheet is a square of side 2√2 set as a diamond, corners S (2, 0), E (4, 2), N (2, 4), W (0, 2), its top side up. Every coordinate is a multiple of ½.

The blintz folds the corners to C (2, 2) along the square [1, 3]². Each later crease is folded through every layer, so it is a full chord of the diamond: the creases are the lines x = c and y = c for c in ½, 1, …, 3½, clipped to the sheet. The lines x = ½, 3½ and y = ½, 3½ cross only the blintz flaps. Four corner diagonals are added, one in each corner square of the blintzed square: (1½, 2½)–(1, 3), (2½, 2½)–(3, 3), (1½, 1½)–(1, 1), (2½, 1½)–(3, 1). That gives 41 vertices, 84 edges (16 boundary) and 44 convex faces, so no subdivision edges.

Crease First creased Final
y = 2, x = 2 (the diagonals) 1, 2 F
y = 1, y = 3: segments of the end walls' top edges, x ∈ [1½, 2½] 3 V 180
y = 1, y = 3: x ∈ [1, 1½] and [2½, 3] 3 M −180
x = 1, x = 3 (the side blintz folds) 4 V 180
y = 2½, y = 1½ through the base, x ∈ [1, 3] 5 V 90
y = 2½, y = 1½ through the side flaps 5 M −90
y = 3½, y = ½ (the end flaps' tips) 5 M −90
x = 1½, x = 2½, y ∈ [1½, 2½] (the side walls) 6 V 90
x = 1½, x = 2½, the rest of the line 6 V 180
x = ½, x = 3½ (the side flaps' tips) 6 M −90
the corner diagonals 9, 11 M −180

The pattern's assignments are the last frame's; the diagonals end flat.

The coupled steps

Raising an end makes a degree-5 vertex at each corner of the floor, for example (1½, 2½): the side wall's hinge below it (held at 90°), the crease A between the side wall and the corner square, the corner diagonal, the crease x = 1½ above it between the corner square and the end wall, and the end wall's hinge y = 2½. With the floor and the side wall still, A stands vertical, and the corner square's two triangles (45° each), the end wall (90°) and the fixed 90° between A and the end wall's hinge form a spherical four-bar linkage with one degree of freedom. With β the angle at A and ε the end wall's angle:

cos β = tan(45° − ε/2), so ε = 90° − 2 atan(cos β).

At ε = 90° the two triangles and the end wall lie in one plane, the corner folded flat against the inside of the end wall.

The driver is β (driver defaults to the first crease, A), linear 0 → 90°. Driving ε instead puts β ∝ √ε at the start, which the 257-sample curve cannot follow. foldc solves the end wall's hinge and both diagonals; the far corner's A comes out linear by symmetry. The solved hinge matches the closed form: 1.11°, 4.53°, 19.47°, 48.12° at β = 11.25°, 22.5°, 45°, 67.5°. The corner square's other crease, the blintz flap's crease on line A and the end flap's crease on line x = 1½ close coaxial loops, and their end angles are measured.

Classification: rigid. Both steps close (solved curves, gap within 1e-6 of the sheet), nothing interpenetrates at 64 samples, and the validator's layer rules and layerMotionDefects pass. Intermediate states were also drawn and checked by eye. In the app on the simulator, both steps complete under the fold drag; the accessibility audit walks them at both text sizes.

Steps 10 and 12 fold the end flap 180° over the wall's top edge, with its tip folding −90° on the same window. The tip stays above the floor throughout. With the tip on [0.5, 1] instead, it is still straight when the flap is level, and in step 12 the bottom flap's tip point touches the raised top wall's upper edge.

Layer-order overrides

None. foldc's guess passes the validator, the interpenetration check and layerMotionDefects. The final stacks were checked by hand. Each end wall's corner, from outside in: the end wall, the corner triangle on the end wall's side, the triangle on the side wall's side, the blintz flap's corner, the end flap's corner triangle, and the end flap. Each side wall, from outside in: the wall, then the blintz flap. On the floor, each quarter carries one flap tip.