beloch

beh-LOK · /beˈlɔk/

Origami folding sequences as programs. You name points and lines, fold along constructions that align them, and Beloch evaluates the program to an exact folded state.

.d.c.a.b
1/16
fold (map .a onto .c) as --bd
reverse (map .b onto .c) as --h
reverse (map .d onto .c) as --v
.o = --h * --v--mid = (through .c .o).sr = --ab * --hreverse (map .sr onto --mid through .c) as --rsr
.sl = --da * --vreverse (map .sl onto --mid through .c) as --rsl
.br = --bc * --hreverse (map .br onto --mid through .c) as --rbr
.bl = --cd * --vreverse (map .bl onto --mid through .c) as --rbl
fold (perp --mid through .sr) (moving .a) (up to #[.a .o]) as --pf
fold (perp --mid through .sr) (moving .c) (up to #[.c .o]) (mountain) as --pb
.e1 = (--rsr & .b) * --pffold (map --rsr & .b onto --mid) (moving .e1) (up to #[.e1 .b .o]) as --n1
.e2 = (--rsl & .d) * --pffold (map --rsl & .d onto --mid) (moving .e2) (up to #[.e2 .d .o]) as --n2
.e3 = (--rbr & .b) * --pbfold (map --rbr & .b onto --mid) (moving .e3) (up to #[.e3 .b .o]) (mountain) as --n3
.e4 = (--rbl & .d) * --pbfold (map --rbl & .d onto --mid) (moving .e4) (up to #[.e4 .d .o]) (mountain) as --n4
reverse (perp --n1 through .sr) (moving .b) as --neck
reverse (perp --n2 through .sr) (moving .d) as --tail
.hp = free on --bd & .b from .b at 1/4.ht = free on --rsl & .a from .a at 1/2reverse (through .hp .ht) (moving .b) as --head
  1. 01
    fold (map .a onto .c) as --bd
  2. 02
    reverse (map .b onto .c) as --h
  3. 03
    reverse (map .d onto .c) as --v
  4. 04
    .o = --h * --v--mid = (through .c .o).sr = --ab * --hreverse (map .sr onto --mid through .c) as --rsr
  5. 05
    .sl = --da * --vreverse (map .sl onto --mid through .c) as --rsl
  6. 06
    .br = --bc * --hreverse (map .br onto --mid through .c) as --rbr
  7. 07
    .bl = --cd * --vreverse (map .bl onto --mid through .c) as --rbl
  8. 08
    fold (perp --mid through .sr) (moving .a) (up to #[.a .o]) as --pf
  9. 09
    fold (perp --mid through .sr) (moving .c) (up to #[.c .o]) (mountain) as --pb
  10. 10
    .e1 = (--rsr & .b) * --pffold (map --rsr & .b onto --mid) (moving .e1) (up to #[.e1 .b .o]) as --n1
  11. 11
    .e2 = (--rsl & .d) * --pffold (map --rsl & .d onto --mid) (moving .e2) (up to #[.e2 .d .o]) as --n2
  12. 12
    .e3 = (--rbr & .b) * --pbfold (map --rbr & .b onto --mid) (moving .e3) (up to #[.e3 .b .o]) (mountain) as --n3
  13. 13
    .e4 = (--rbl & .d) * --pbfold (map --rbl & .d onto --mid) (moving .e4) (up to #[.e4 .d .o]) (mountain) as --n4
  14. 14
    reverse (perp --n1 through .sr) (moving .b) as --neck
  15. 15
    reverse (perp --n2 through .sr) (moving .d) as --tail
  16. 16
    .hp = free on --bd & .b from .b at 1/4.ht = free on --rsl & .a from .a at 1/2reverse (through .hp .ht) (moving .b) as --head