(fold-line p1 p2 c)
(fold-onto p1 p2 c) (fold-lontol l1 l2 c) (fold-onto-self p1 l1 c) |
Huzita's axioms 1 through 4. Return value is a crease line.
c is a optional and specifies a color for the crease line |
(intersect l1 l2 c) | Generates (returns) a new point by intersecting two crease lines |
(execute-fold l1 type landmark) | Actually fold the sheet along the crease line (unspecified return value).
Sheet maintains an apical and basal surface.
type = apical/basal, landmark = point indicating which region changes its apical/basal meaning (induction) |
(seepthru #t/#f) | If true, then the folded sheet is treated as one sheet of a
new shape, and creases go through multiple layers of the sheet.
If false, then the crease line is generated wrt to the unfolded sheet (single layer) . Returns previous seepthru value. (unresolved issues: should points generated by intersect seep thru? can old points or lines be made to seep thru? is that useful) |
(define-region r1 (p1 l1))
(within-region r1 op1 op2 ...) |
A region is defined by a crease line l1 that divides the sheet into
two halves and the point p1 indicates which half forms the region r1.,
One can restrict any of the above operations (including seepthru) to occur within only the defined region. |
Not all crease lines are folded, execute-fold actually implies that the sheet should be folded along the crease Not all folds go through all layers of the paper. If seepthru is true then any future creases formed will go through all layers, otherwise the fold goes through a single layer. Many creases are intermediate steps that do not need to be used beyond some small scope and can be nested. The arguments are evaluated before the operation is applied and the order in which the arguments are evaluated is not specified. It is important to make sure that there are no order dependencies between the arguments.
Example:
(execute-fold (fold-onto l1 l2) apical landmark)
(define d1 (fold-onto-self (intersect l1 l2) (fold-onto l3 l4)))
Origami has an implicit notion of a top surface. The type of fold - mountain or valley - is relative to the top surface. After a fold, one side is chosen as the new top surface and future folds are relative to this new top. This is essential, since even a simple structure like a cup will fail if the fold direction is chosen arbitrarily. In the global language we make this more explicit by having the cellsheet maintain an apical surface and a basal surface. A origami valley fold is an apical surface fold and a origami mountain fold is a basal surface fold. After a fold is executed, the apical and basal surfaces are redetermined. Execute-fold specifies a landmark ( a point or crease) that determines which side of the fold will induce its surface polarity on the other. This is inspired by the idea of tissue induction where one region of cells induces its type or function or polarity on new cells that it comes into contact with.
All folds are flat folds, which implies that the structure always folds
flat. Future extensions to the language will include non-flat folds and
folds through multiple layers. Also, the initial sheet need not be a square,
but can be any shape with initial boundery conditions, and in fact this
already happens as the shape of sheet changes with each fold. The key is
that the initial conditions required are simple, few, and likely to remain
the same for a given initial shape.
(defun (fold-wing corner cntr-pt cntr-line landmark color)
(let (t2 t3 t4)
(set! t2 (fold-onto corner cntr-pt color))
(execute-fold t2 apical landmark)
(set! t3 (fold-lontol t2 cntr-line color))
(execute-fold t3 apical landmark)
(set! t4 (fold-lontol t3 cntr-line color))
(execute-fold t4 apical landmark)
))
(define cntr (fold-lontol e14 e23 "green"))
(define tmp-l (fold-lontol e12 e34 "yellow"))
(define tmp-m (intersect cntr tmp-l "red"))
(seepthru #t)
(fold-wing c1 tmp-m cntr c4 "green") ;left wing
(fold-wing c2 tmp-m cntr c3 "magenta") ;right wing
(execute-fold cntr basal landmark=c4)
Regions
Define-region and within-region allow one to restrict the execution
of a sequence of folds to occur only within some region. A region is defined
by a crease line which cuts the sheet into two disjoint regions and a landmark
point that distinguishes one side from the other. Even seepthru is restricted
within that region. The global language allows one to create more complicated
regions by using OR and AND on existing regions.
(define-region rside (create-region cntr c2))
(within-region R1 (fold-wing c2 tmp-m cntr c3 "magenta"))
Regions have many uses. Regions compliment the modularity introduced by procedures. If the regions are disjoint then the same set of code could be executed in both regions without interference. Regions also allow one to use segments of lines (by using only the part of the line that lies within the region) .
Regions also allow one to create and execute folds that do not go through all the layers. In origami this tends to be implicit and expressed through diagrams. Most such folds involve flaps - flaps are regions of the origami that are like appendages off the main origami body and one can define folds that only affect the flap, not the main body, no matter where the flap is. The notion of flaps and operations on flaps is captured by define-region and within-region.