docs/authoring/cup.md

00ea029d0652da12d0f4237769e7020b72cfa7f3
fold/docs/authoring/cup.md rendered · source · history · blame · raw

96 lines · 4525 bytes

4 symbols in this file

Cup

Traditional. Six steps: five folds of one axis each and a turn-over. No coupled steps (no solved curves) and no non-rigid steps.

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

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

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

Crease pattern

Constructed from the traditional folding sequence, not taken from a published crease pattern. The sheet is a square of side √2 set as a diamond, corners S (1, 0), E (2, 1), N (1, 2), W (0, 1), its top side up (+z).

Step 1 folds S up to N along the diagonal y = 1, giving a triangle with its folded edge W–E at the bottom and apex N. Step 2 folds corner E to the left edge W–N so that the flap's top edge, part of the former right edge E–N, is level. Reflecting E–N (direction 135°) onto a horizontal line needs a crease at 67.5°; the one that also puts E on W–N runs from Q = (4 − 2√2, 1) on the fold to R = (√2, 3 − √2) on the right edge, and E lands on P = (2 − √2, 3 − √2). Step 3 is its mirror image: the crease from Q′ = (2√2 − 2, 1) to P, and W lands on R. The apex flaps fold down along the level line through P and R. Each crease through both layers of the triangle is two creases in the pattern, one in each half of the diamond, mirrored in y = 1.

Vertex Point Coordinates
v0 S (1, 0)
v1 R′ (√2, √2 − 1)
v2 E (2, 1)
v3 R (√2, 3 − √2)
v4 N (1, 2)
v5 P (2 − √2, 3 − √2)
v6 W (0, 1)
v7 P′ (2 − √2, √2 − 1)
v8 Q′ (2√2 − 2, 1)
v9 Q (4 − 2√2, 1)
Edges Crease Assignment Step
e0–e7 boundary, S → R′ → E → R → N → P → W → P′ → S B —
e8, e9, e10 the diagonal: W–Q′, Q′–Q, Q–E V 1
e11, e12 Q–R (top half), Q–R′ (bottom half) V, M 2
e13, e14 Q′–P (top half), Q′–P′ (bottom half) V, M 3
e15 P′–R′, the front apex flap M 4
e16 P–R, the back apex flap M 6

Faces, counterclockwise: f0 [P′, S, R′] (front apex flap), f1 [P′, R′, Q, Q′] (front body), f2 [R′, E, Q] and f6 [Q, E, R] (the right corner flap, front and back layers), f3 [W, P′, Q′] and f4 [W, Q′, P] (the left corner flap), f5 [Q′, Q, R, P] (back body), f7 [P, R, N] (back apex flap).

Every crease ends on the boundary or at Q or Q′ on the diagonal, so no subdivision edges are needed. Q and Q′ are degree-4 vertices with sectors 67.5°, 112.5°, 112.5°, 67.5° and three valleys to one mountain.

The bottom half's creases are mountains because that half is turned face-down by step 1: steps 2–4 fold toward the viewer, which is a valley seen from the front and a mountain on the bottom half's own top side. Step 6 folds the back apex flap toward the viewer after the turn-over, when its top side faces away.

Sequence

  1. Valley fold S up to N along the diagonal (named crease e9; e8 and e10 lie on its line and fold with it).
  2. Valley fold the right corner E across to P, through both layers (e11; e12 folds with it). The right corner goes first.
  3. Valley fold the left corner W across to R, over the first flap (e13 and e14). Six layers where the corner flaps cross.
  4. Valley fold the front apex flap f0 down over the front along P–R (e15). S lands on (1, 4 − 2√2). Seven layers.
  5. Turn over, about the vertical axis.
  6. Valley fold the back apex flap f7 down (e16). N lands on (1, 4 − 2√2). Eight layers in the triangle P, R, (1, 4 − 2√2).

The apex flaps are folded down over the outside, not tucked into the pocket. The model ends flat. Viewpoint: eye (0, 0, 1), up (0, 1, 0) throughout.

Layer-order overrides

None. Every step is a plain valley fold of one moving set onto the outside of the stack, which is the case the compiler's guess (the moving set lands on the side it arrives from, its own layers reversed) gets right. foldc's validation, the interpenetration check and layerMotionDefects pass with the guessed orders, and the guessed stacks were checked by hand against the sequence: after step 3, bottom to top along +z, f5, f1, f2, f6, f3, f4; step 4 puts f0 on top of all of them; step 6 puts f7 on top of the turned-over stack.