Untitled

©2016 Amy Wibowo, BubbleSort Zines
No part of this publication can be reprinted without
written permission from BubbleSort Zines.
When I was studying computer science in college, i needed to take a class to fulfill an advanced
algorithms requirement. And instead of taking
the class called “advanced algorithms” I took the
class called “paperfolding algorithms”, which also
counted towards that requirement. We spent every day talking about and proving theorems about
origami, and this one was my favorite.
that you can generate any polygonal shape or
even multiple shapes, from a piece of paper, with
just one cut. Any polygonal shape. With just
one cut. That’s a bold claim, but it’s been proven
by Professor Eric Demaine of MIT along with
Martin Demaine, Professor Anna Lubiw of the
University of Waterloo.
The first reference to this theorem is from a Japanese puzzle book in 1721. The puzzle challenged
the reader: can you cut out this shime (lightning
shape said to ward of evil spirits) from a piece of
paper with just a single cut?
Just to reiterate the theorem again in illustration
form: you can generate any polygonal shape
from a piece of paper with just one cut.
Though, you might need to fold the paper many
times before you make the cut.
And so now the question becomes, even if we
know that this is possible, how and where do we
fold the paper to make that true?
There are a couple ways of thinking about it,
conceptually. We can think of it this way: we
want to fold the piece of paper so that everything that’s part of the cat is above a line, and
everything that is not cat is below a line, and
then we cut at that line.
Here’s another way to think about it:
We want to fold the piece of paper so that the
outline of the cat, which is everything that we
need to cut, is all aligned on the same line.
And it turns out to be this way of thinking that
will help us come up with an algorithm to find
the folds necessary before the one cut.
Now that we know this algorithm is going to be
based around lining up edges, let’s think of some
simple examples of lining up edges. For example, if
you wanted the top and the side of a piece of paper
to line up, you’d fold the paper at a 45 degree angle, and this would align the top and side.
And if you have two lines on a piece of paper and
you wanted to line them up you’d fold somewhere
between the two lines to align them.
And if you extended those lines until they met
somewhere off the piece of paper, we could see
that we’re specifically folding between the two
lines at their angle bisector. Folding on the the
angle bisector is how we get lines to line up.
But, how do we generalize this for getting all the
edges of a polygon to be colinear?
For example, what happens when we have a
complicated polygon and a bunch of the angle
bisectors intersect?
To deal with those cases, we calculate what
mathematicians call the straight skeleton.
It’s called the straight skeleton because when
you calculate it, it ends up looking like it could
be the actual skeletal support structure for that
shape.
So how do you calculate it?
You:
1. Shrink the original shape while maintaining
constant perpendicular distance from the original edges.
2. Trace the path of the vertices as the shape
shrinks to get the straight skeleton
You’ll see that this path so far is consistent with
our idea that the angle bisectors of a shape are
an important component of aligning sides of a
polygon.
And as you’re shrinking the shape you might
run into 3 types of edge cases.
1. The Point
As you shrink a shape, it might get so small
eventually that it shrinks into a single point. if
this happens, you stop. Our definition of the
straight skeleton is the path of the vertices as
the shape shrinks, and if the shape is a single
point, it can’t shrink anymore. So the simple
skeleton is the path from the original vertices
to that single point, indicated by the bold lines
in this figure.
2. The Edge
Here is another (literal) edge case you might
run into: as you shrink a shape, two edges
might merge into a single edge, like the top and
bottom edge of this rectangle eventually do.
what does this mean for calculating the straight
skeleton? you include the merged edge in the
straight skeleton, along with the path of the
vertices to this merged edge. the straight skeleton is shown in bold.
3. Split Shapes
Finally, as you shrink a shape it might separate
into two disjoint shapes. that’s totally ok—just
apply the algorithm to both shapes recursively.
With these rules, you can write a program to
calculate the simple skeleton of any polygonal
shape! The screenshot above is from a solver I
wrote.
So now that we have the skeleton, can we fold
along it to cut out the ruby with a single cut?
Almost!
So the straight skeleton is most of, but not the
full set of, folds that we need to make to create
a shape with a single cut.
Why do we need more folds? We’ll need to talk
about a concept called flat-foldability first.
Here is a simple example of why the straight
skeleton isn’t fully sufficient for our purposes. This is a rectangle, shown with its straight
skeleton. What happens when we try to fold
along the skeleton lines? (You can try it to see
for yourself.)
If we tried to fold along the rectangle’s skeleton lines, we would see that it doesn’t fold into
a flat shape. And our paper needs to be flat for
us to be able to cut it with one cut.
So we have seen that
There are folding theorems formalizing which
sets of edges will fold flat and which cannot
fold flat, and even which sets of edges are impossible to fold. A set of edges that can be folded flat is called flat-foldable.
For this rectangle, we would be able to fold it
flat if we added perpendicular helper fold lines
that extend from the inner skeleton vertices to
the edges of the rectangle.
You can try it out to see for yourself!
How do we generalize this? How can we add
a few folds to any straight skeleton in order to
make it flat foldable?
First of all, we can establish that these helper
folds must meet the shape edges at 90 degrees,
because then they’re guaranteed not to interfere
with the way the edges of the shape line up in a
single line.
So we can draw perpendiculars from every vertex of the straight skeleton to edges of the shape
we want to cut out. We won’t need all of them,
but none of them will hurt foldability or affect
one cut-ability.
Here is what we get if we draw perpendiculars
from every straight skeleton vertex on the ruby
that we generated earlier.
If you’d like to read more about the fold-and-cut
theorem, including the paper that proves it, you
can read more here!
http://erikdemaine.org/foldcut/
by Eric Demaine
J
If you enjoyed this zine, you can find other zines
about computer science and algorithms at:
http://bubblesort.io