# Mathematics of paper folding

The discipline of origami or paper folding has received a considerable amount of mathematical study. Fields of interest include a given paper model's flat-foldability (whether the model can be flattened without damaging it), and the use of paper folds to solve mathematical equations up to the third order.
Computational origami is a recent branch of computer science that is concerned with studying algorithms that solve paper-folding problems. The field of computational origami has also grown significantly since its inception in the 1990s with Robert Lang's TreeMaker algorithm to assist in the precise folding of bases. Computational origami results either address origami design or origami foldability. In origami design problems, the goal is to design an object that can be folded out of paper given a specific target configuration. In origami foldability problems, the goal is to fold something using the creases of an initial configuration. Results in origami design problems have been more accessible than in origami foldability problems.

## History

In 1893, Indian civil servant T. Sundara Row published Geometric Exercises in Paper Folding which used paper folding to demonstrate proofs of geometrical constructions. This work was inspired by the use of origami in the kindergarten system. Row demonstrated an approximate trisection of angles and implied construction of a cube root was impossible.
In 1922, Harry Houdini published "Houdini's Paper Magic," which described origami techniques that drew informally from mathematical approaches that were later formalized.
In 1936 Margharita P. Beloch showed that use of the 'Beloch fold', later used in the sixth of the Huzita–Hatori axioms, allowed the general cubic equation to be solved using origami.
In 1949, R C Yeates' book "Geometric Methods" described three allowed constructions corresponding to the first, second, and fifth of the Huzita–Hatori axioms.
The Yoshizawa–Randlett system of instruction by diagram was introduced in 1961.
In 1980 a construction was reported which enabled an angle to be trisected. Trisections are impossible under Euclidean rules.
Also in 1980, Kōryō Miura and Masamori Sakamaki demonstrated a novel map-folding technique whereby the folds are made in a prescribed parallelogram pattern, which allows the map to be expandable without any right-angle folds in the conventional manner. Their pattern allows the fold lines to be interdependent, and hence the map can be unpacked in one motion by pulling on its opposite ends, and likewise folded by pushing the two ends together. No unduly complicated series of movements are required, and folded Miura-ori can be packed into a very compact shape. In 1985 Miura reported a method of packaging and deployment of large membranes in outer space, and as early as 2012 this technique had been applied to solar panels on spacecraft.
In 1986, Messer reported a construction by which one could double the cube, which is impossible with Euclidean constructions.
The first complete statement of the seven axioms of origami by French folder and mathematician Jacques Justin was written in 1986, but were overlooked until the first six were rediscovered by Humiaki Huzita in 1989. The first International Meeting of Origami Science and Technology (now known as the International Conference on Origami in Science, Math, and Education) was held in 1989 in Ferrara, Italy. At this meeting, a construction was given by Scimemi for the regular heptagon.
Around 1990, Robert J. Lang and others first attempted to write computer code that would solve origami problems.
In 1996, Marshall Bern and Barry Hayes showed that the problem of assigning a crease pattern of mountain and valley folds in order to produce a flat origami structure starting from a flat sheet of paper is NP-complete.
In 1999, a theorem due to Haga provided constructions used to divide the side of a square into rational fractions.
In late 2001 and early 2002, Britney Gallivan proved the minimum length of paper necessary to fold it in half a certain number of times and folded a 4,000-foot-long (1,200 m) piece of toilet paper twelve times.
In 2002, Sarah-Marie Belcastro and Tom Hull brought to the theoretical origami the language of affine transformations, with an extension from $R$$^2$ to $R$$^3$ in only the case of single-vertex construction.
In 2002, Alperin solved Alhazen's problem of spherical optics. In the same paper, Alperin showed a construction for a regular heptagon. In 2004, was proven algorithmically the fold pattern for a regular heptagon. Bisections and trisections were used by Alperin in 2005 for the same construction.
In 2003, Jeremy Gibbons, a researcher from the University of Oxford, described a style of functional programming in terms of origami. He coined this paradigm as "origami programming." He characterizes fold and unfolds as natural patterns of computation over recursive datatypes that can be framed in the context of origami.
In 2005, principles and concepts from mathematical and computational origami were applied to solve Countdown, a game popularized in British television in which competitors used a list of source numbers to build an arithmetic expression as close to the target number as possible.
In 2009, Alperin and Lang extended the theoretical origami to rational equations of arbitrary degree, with the concept of manifold creases. This work was a formal extension of Lang's unpublished 2004 demonstration of angle quintisection.

## Pure origami
### Flat folding

The construction of origami models is sometimes shown as crease patterns. The major question about such crease patterns is whether a given crease pattern can be folded to a flat model, and if so, how to fold them; this is an NP-complete problem. Related problems when the creases are orthogonal are called map folding problems. There are three mathematical rules for producing flat-foldable origami crease patterns:
* Maekawa's theorem: at any vertex the number of valley and mountain folds always differ by two.
    It follows from this that every vertex has an even number of creases, and therefore also the regions between the creases can be colored with two colors.
* Kawasaki's theorem or Kawasaki-Justin theorem: at any vertex, the sum of all the odd angles (see image) adds up to 180 degrees, as do the even.
* A sheet can never penetrate a fold.
Paper exhibits zero Gaussian curvature at all points on its surface, and only folds naturally along lines of zero curvature. Curved surfaces that can't be flattened can be produced using a non-folded crease in the paper, as is easily done with wet paper or a fingernail.
Assigning a crease pattern mountain and valley folds in order to produce a flat model has been proven by Marshall Bern and Barry Hayes to be NP-complete. Further references and technical results are discussed in Part II of Geometric Folding Algorithms.

### Huzita–Justin axioms

Some classical construction problems of geometry — namely trisecting an arbitrary angle or doubling the cube — are proven to be unsolvable using compass and straightedge, but can be solved using only a few paper folds. Paper fold strips can be constructed to solve equations up to degree 4. The Huzita–Justin axioms or Huzita–Hatori axioms are an important contribution to this field of study. These describe what can be constructed using a sequence of creases with at most two point or line alignments at once. Complete methods for solving all equations up to degree 4 by applying methods satisfying these axioms are discussed in detail in Geometric Origami.

## Constructions

As a result of origami study through the application of geometric principles, methods such as Haga's theorem have allowed paperfolders to accurately fold the side of a square into thirds, fifths, sevenths, and ninths. Other theorems and methods have allowed paperfolders to get other shapes from a square, such as equilateral triangles, pentagons, hexagons, and special rectangles such as the golden rectangle and the silver rectangle. Methods for folding most regular polygons up to and including the regular 19-gon have been developed. A regular n-gon can be constructed by paper folding if and only if n is a product of distinct Pierpont primes, powers of two, and powers of three.

### Haga's theorems

The side of a square can be divided at an arbitrary rational fraction in a variety of ways. Haga's theorems say that a particular set of constructions can be used for such divisions. Surprisingly few folds are necessary to generate large odd fractions. For instance 1⁄5 can be generated with three folds; first halve a side, then use Haga's theorem twice to produce first 2⁄3 and then 1⁄5.
The accompanying diagram shows Haga's first theorem:
    $BQ={\frac {2AP}{1+AP}}.$
The function changing the length AP to QC is self inverse. Let x be AP then a number of other lengths are also rational functions of x. For example:
Haga's first theorem :
| AP | BQ | QC | AR | PQ |
| $x$ | ${\frac {2x}{1+x}}$ | ${\frac {1-x}{1+x}}$ | ${\frac {1-x^{2}}{2}}$ | ${\frac {1+x^{2}}{1+x}}$ |
| 1⁄2 | 2⁄3 | 1⁄3 | 3⁄8 | 5⁄6 |
| 1⁄3 | 1⁄2 | 1⁄2 | 4⁄9 | 5⁄6 |
| 2⁄3 | 4⁄5 | 1⁄5 | 5⁄18 | 13⁄15 |
| 1⁄5 | 1⁄3 | 2⁄3 | 12⁄25 | 13⁄15 |

### A generalization of Haga's theorems

Haga's theorems are generalized as follows:
    ${\frac {BQ}{CQ}}={\frac {2AP}{BP}}.$
Therefore, BQ:CQ=k:1 implies AP:BP=k:2 for a positive real number k.

### Doubling the cube

The classical problem of doubling the cube can be solved using origami. This construction is due to Peter Messer: A square of paper is first creased into three equal strips as shown in the diagram. Then the bottom edge is positioned so the corner point P is on the top edge and the crease mark on the edge meets the other crease mark Q. The length PB will then be the cube root of 2 times the length of AP.
The edge with the crease mark is considered a marked straightedge, something which is not allowed in compass and straightedge constructions. Using a marked straightedge in this way is called a neusis construction in geometry.

### Trisecting an angle

Angle trisection is another of the classical problems that cannot be solved using a compass and unmarked ruler but can be solved using origami. This construction, which was reported in 1980, is due to Hisashi Abe. The angle CAB is trisected by making two folds: PP', parallel to the base, and QQ', halfway in between. Then point P is folded over to lie on line AC and at the same time point A is made to lie on line QQ' at A'. The angle A'AB is one third of the original angle CAB. This is because PAQ, A'AQ and A'AR are three congruent triangles. Aligning the two points on the two lines is another neusis construction as in the solution to doubling the cube.

## Related problems

The problem of rigid origami, treating the folds as hinges joining two flat, rigid surfaces, such as sheet metal, has great practical importance. For example, the Miura map fold is a rigid fold that has been used to deploy large solar panel arrays for space satellites.
The napkin folding problem is the problem of whether a square or rectangle of paper can be folded so the perimeter of the flat figure is greater than that of the original square.
The placement of a point on a curved fold in the pattern may require the solution of elliptic integrals. Curved origami allows the paper to form developable surfaces that are not flat. Wet-folding origami is a technique evolved by Yoshizawa that allows curved folds to create an even greater range of shapes of higher order complexity.
The maximum number of times an incompressible material can be folded has been derived. With each fold a certain amount of paper is lost to potential folding. The loss function for folding paper in half in a single direction was given to be $L={\tfrac {\pi t}{6}}(2^{n}+4)(2^{n}-1)$, where L is the minimum length of the paper (or other material), t is the material's thickness, and n is the number of folds possible. The distances L and t must be expressed in the same units, such as inches. This result was derived by Britney Gallivan, a high schooler from California, in December 2001. In January 2002, she folded a 4,000-foot-long (1,200 m) piece of toilet paper twelve times in the same direction, debunking a long-standing myth that paper cannot be folded in half more than eight times.
The fold-and-cut problem asks what shapes can be obtained by folding a piece of paper flat, and making a single straight complete cut. The solution, known as the fold-and-cut theorem, states that any shape with straight sides can be obtained.
A practical problem is how to fold a map so that it may be manipulated with minimal effort or movements. The Miura fold is a solution to the problem, and several others have been proposed.

## Computational origami

Computational origami is a branch of computer science that is concerned with studying algorithms for solving paper-folding problems. In the early 1990s, origamists participated in a series of origami contests called the Bug Wars in which artists attempted to out-compete their peers by adding complexity to their origami bugs. Most competitors in the contest belonged to the Origami Detectives, a group of acclaimed Japanese artists. Robert Lang, a research-scientist from Stanford University and the California Institute of Technology, also participated in the contest. The contest helped initialize a collective interest in developing universal models and tools to aid in origami design and foldability.

### Research

Paper-folding problems are classified as either origami design or origami foldability problems. There are predominantly three current categories of computational origami research: universality results, efficient decision algorithms, and computational intractability results. A universality result defines the bounds of possibility given a particular model of folding. For example, a large enough piece of paper can be folded into any tree-shaped origami base, polygonal silhouette, and polyhedral surface. When universality results are not attainable, efficient decision algorithms can be used to test whether an object is foldable in polynomial time. Certain paper-folding problems do not have efficient algorithms. Computational intractability results show that there are no such polynomial-time algorithms that currently exist to solve certain folding problems. For example, it is NP-hard to evaluate whether a given crease pattern folds into any flat origami.
In 2017, Erik Demaine of the Massachusetts Institute of Technology and Tomohiro Tachi of the University of Tokyo published a new universal algorithm that generates practical paper-folding patterns to produce any 3-D structure. The new algorithm built upon work that they presented in their paper in 1999 that first introduced a universal algorithm for folding origami shapes that guarantees a minimum number of seams. The algorithm will be included in Origamizer, a free software for generating origami crease patterns that was first released by Tachi in 2008.

### Software & tools

There are several software design tools that are used for origami design. Users specify the desired shape or functionality and the software tool constructs the fold pattern and/or 2D or 3D model of the result. Researchers at the Massachusetts Institute of Technology, Georgia Tech, University of California Irvine, University of Tsukuba, and University of Tokyo have developed and posted publicly available tools in computational origami. TreeMaker, ReferenceFinder, OrigamiDraw, and Origamizer are among the tools that have been used in origami design.
There are other software solutions associated with building computational origami models using non-paper materials such as Cadnano in DNA origami.

### Applications

Computational origami has contributed to applications in robotics, engineering, biotechnology & medicine, industrial design. Applications for origami have also been developed in the study of programming languages and programming paradigms, particular in the setting of functional programming.
Robert Lang participated in a project with researchers at EASi Engineering in Germany to develop automotive airbag folding designs. In the mid-2000s, Lang worked with researchers at the Lawrence Livermore National Laboratory to develop a solution for the James Webb Space Telescope, particularly its large mirrors, to fit into a rocket using principles and algorithms from computational origami.
In 2014, researchers at the Massachusetts Institute of Technology, Harvard University, and the Wyss Institute for Biologically Inspired Engineering published a method for building self-folding machines and credited advances in computational origami for the project's success. Their origami-inspired robot was reported to fold itself in 4 minutes and walk away without human intervention, which demonstrated the potential for autonomous self-controlled assembly in robotics.
Other applications include DNA origami and RNA origami, folding of manufacturing instruments, and surgery by tiny origami robots.
Applications of computational origami have been featured by various production companies and commercials. Lang famously worked with Toyota Avalon to feature an animated origami sequence, Mitsubishi Endeavor to create a world entirely out of origami figures, and McDonald's to form numerous origami figures from cheeseburger wrappers.