# Virtual Origami

- Origami programming in E-Origami System -

Virtual Origami

- Origami programming in E-Origami System -

- Origami programming in E-Origami System -

Tetsuo Ida, University of Tsukuba

#WolframTechConf

## ABSTRACT

ABSTRACT

Origami attracts the minds of people all over the world. Some are interested in its geometric aspects, and others in artistic or recreational elements, so-called traditional origami. Although both origami categories rely on the notion of paper folding, their methodologies differ due to the pursuits’ objectives. We focus on traditional origami but approach it with mathematical formalism rather than artistic values. Using Mathematica’s leading-edge symbolic, numeric, and graphics computation capabilities, we realize origami in a virtual space.

The origami creators’ interest lies more in artistic values than general folding rules. In contrast, origami geometers’ motivation is finding a few basic fold rules. We have the set ofHuzita-Justin rules in origami geometry; we are more liberal in defining basic fold rules in traditional origami. The fold rules may be many. This talk only gives some basic fold rules essential in traditional origami.

We show squash and outside-reverse folds; these folds intricately combine several simple folds. A squash fold requires the simultaneous three simple folds, i.e., mountain or valley fold, subjected to non-trivial constraints. We extend Huzita-Justin’s rules by introducing a cut along a crease. The operations of cutting and later gluing simplify a squash fold significantly. We can apply the cut operation to other classical folds and streamline their modeling and realization in virtual origami.

We present the construction of a flying crane. It not only serves as a mathematical and computational description of this famous origami but also shows the effectiveness and expandability of our origami modeling for virtualization.

The origami creators’ interest lies more in artistic values than general folding rules. In contrast, origami geometers’ motivation is finding a few basic fold rules. We have the set ofHuzita-Justin rules in origami geometry; we are more liberal in defining basic fold rules in traditional origami. The fold rules may be many. This talk only gives some basic fold rules essential in traditional origami.

We show squash and outside-reverse folds; these folds intricately combine several simple folds. A squash fold requires the simultaneous three simple folds, i.e., mountain or valley fold, subjected to non-trivial constraints. We extend Huzita-Justin’s rules by introducing a cut along a crease. The operations of cutting and later gluing simplify a squash fold significantly. We can apply the cut operation to other classical folds and streamline their modeling and realization in virtual origami.

We present the construction of a flying crane. It not only serves as a mathematical and computational description of this famous origami but also shows the effectiveness and expandability of our origami modeling for virtualization.

## OutLine

OutLine

Eos and Orikoto language

Geometric construction and verification by Orikoto

Traditional origami by Eos

Example: Flying crane origami

## What is Origami?

What is Origami?

Origami ⟺ Ori + Kami ⟺ folding + paper ⟺ Paper folding

operation of paper folding

a sheet of paper for origami

the art of paper folding

## Use of Origami

Use of Origami

protocol origami (even before the 10th century),

to convey feelings and thoughts by symbolic shapes; imagine E-moji

to convey feelings and thoughts by symbolic shapes; imagine E-moji

decoration in daily life, e.g., wrapping a gift (contemporary)

teaching material, especially geometry (modern, from 19 century)

industrial application, e.g., antenna in a satellite

## Origami Geometry and Euclidean Geometry

Origami Geometry and Euclidean Geometry

### Construction tools

Construction tools

In Origami, we only have paper folding according to fold rules called Huzita-Justin rules.

In Euclid, we have a straightedge and a compass.

## Comparison: Euclid and Origami

Comparison: Euclid and Origami

With the Euclid tool, we can draw circles and lines, and can construct points of their intersections (circle and circle, circle and line, and line and line).

In Origami, we can construct a crease made by fold and unfold along the same fold-line. The fold-line becomes a crease. Conversely, a crease can be extended to be a line when we imagine an infinite sheet of paper. We can construct the intersections of creases.

In both cases, we have a set E (E for Euclid) and O (O for Origami) of points (intersections).

E and O form a field when we appropriately define field operations.

When we continue constructions in E, we form a tower of fields;

, , ..., . is a field extension of with operation of taking the square root, starting from the field of rational numbers.

E

0

E

1

E

i+1

E

i

When we continue constructions in O, we from a tower of fields,

, , ..., . is a series of field extensions each by operation of taking a square root or cube root, starting from the field of rational numbers.

O

0

O

1

O

i+1

In the above sense, origami geometry is more powerful than Euclidean geometry.

## Examples that Origami can but Euclidean tool cannot

Examples that Origami can but Euclidean tool cannot

By origami, we can do the following:

Construct a trisector of an arbitrary angle

Construct a regular heptagon

Double a cube

Compute a cube root of a number

## Huzita-Justin rules

Huzita-Justin rules

Huzita-Justin rule set is based the superpositions (points and lines). It consists of seven rules.

We can fold by hand.

#### O1

O1

#### O2

O2

#### O3

O3

#### O4

O4

#### O5

O5

#### O6

O6

#### O7

O7

## Language Orikoto

Language Orikoto

Orikoto is a language for origami programming for Eos, sub-language of Wolfram Language

Orikoto runs on Mathematica (Version 11, 12 13.1)

## Example - Angle trisection

Example - Angle trisection

#### Construction

Construction

In[]:=

EosSession["Angle trisector"];

Usually, the first command that we enter is EosSession, which initializes Eos run-time environment. The argument of EosSession is a string that names the session we begin. This name will appear in the subsequent steps of the command executions.

We then create a new origami of 10 by 10 square.

We construct a new point E at an arbitrary position on the origami. For the construction, we have to give a concrete location, e.g., (6,8) in this example. Any point on the origami will do.

The next command expresses O1. It asks Eos to fold the origami along the line that extends the segment AE. The default fold is so-called “valley fold” and right faces of the fold-line are moved. Here, you have to think of the half-line starting at point A since we need the notion of the direction to determine left/right hand side.

The command line below ends by an exclamation mark ‘!’. The exclamation mark is a postfix notation of command Unfold. This line consists of two commands of folding by rule O1 and unfolding; the resulting origami to restore to the previous shape. The net effect is to obtain the crease EA.

The command line below ends by an exclamation mark ‘!’. The exclamation mark is a postfix notation of command Unfold. This line consists of two commands of folding by rule O1 and unfolding; the resulting origami to restore to the previous shape. The net effect is to obtain the crease EA.

We will trisect the angle ∠EAB. We need three lines AB, HI, and FG by Abe’s method. The three lines are parallel, and Line HI is equidistant from AB and FG. Since we already have AB, we now construct line FG. We apply rule O2. We obtain line FG. Line FG is the perpendicular bisector of the segment AD. Note that in the command arguments we specify Mark-> {“AD”,”BC”}. This added argument asks Eos to mark the intersections of the fold-line with segments AD and BC. The names of the intersections are not specified in the command. Hence, the system automatically assigns names F and G to the intersections with AD and BC, respectively.

Similarly, we obtain line HI .

The next step is the most important in the construction. In this step, we enter a command of rule O6 We fold the origami in such a way as to bring point F to line AE and point A to line HI. The command calls for two superpositions. We see that three fold-lines satisfy this requirement. Therefore, this command with four arguments cannot determine a single requested folding. It only shows three possible cases.

We select the third one in the above cases and obtain the origami shown below.

#### Construction continued

Construction continued

We almost finish the construction of the two trisectors. The line that passes through the left-bottom corner (formerly point A position) of the original origami and point A is one trisector, and the other is the line that passes through the left-bottom corner and point H.

The rest of the commands help us to view the obtained trisectors.

The graphics output more clearly shows the trisectors. They are the lines that extend the segments AK and AJ.

At this point, we apply synthetic geometrical reasoning and show the correctness of the construction. We can perform the algebraic theorem proving using Groebner basis theory. Only the following is required to verify the correctness of the construction program for any point E.

## Verification

Verification

Without loss of generality, we let the initial origami a unit square. We set the location of E to be arbitrary. This can be specified by “E” {u1,u2}, where u1 and u2 are free variables.

## Morley’s Theorem

Morley’s Theorem

Triangle SLR is equilateral

## Traditional Origami

Traditional Origami

Many people, origami is fun for more reasons

More complicated methods of folding are used.

### Valley fold and Mountain fold

Valley fold and Mountain fold

The most elementary fold operations are mountain fold and valley fold. They are called so because the crease looks figuratively like the mountain ridge and valley path. The crease is made by the unfold operation that follows the mountain (or valley) fold. To see how we perform those elementary folds, we show a tiny Orikoto program and run it.

The result of the valley fold is shown in Fig.1(b). The origami is now two- layered, but the back layer is not visible since the top triangular face completely overlaps the back triangular face and hides it. Next, we unfold the origami shown in Fig. 1(c). Unfold does not mean “undoing,” although we recover the shape of the origami to the one in Fig.1(a) except for the dotted line segment CA. We call the line segment valley crease. The line segment looks like a path in the valley if we have a good imagination. In our e-origami, we simulate the situation by looking at the origami lying on the plane precisely from the top right angle. To see the configuration in a way that models the physical space and the origami, we switch to the three-dimensional view mode.

Similarly, we have a mountain fold below.

### FO

FO

FO, standing for Fold Origami, is a head symbol of a command FO[θ] [faces,ray] for rotating target faces along ray by fold angle θ. It is a generalization of mountain and valley folds. Note that FO is defined as a Curried function. Using FO, we could define short commands VFold for ValleyFold and MFold for MountainFold. We define them as follows:

If faces are omitted, Eos infers the target faces. With θ other than ± π, command FO constructs a 3D origami in general. In such cases, we need careful use of FO. Usually, we use FO[ θ ] at the end steps of the construction.

### Inside-reverse and outside-reverse Folds

Inside-reverse and outside-reverse Folds

The inside-reverse and outside-reverse folds are often used methods of folds. Both work on a pair of superposed faces that share an edge. They are combinations of an inside fold and an outside fold. However, each uses inside and outside folds oppositely. In the case of performing the inside-reverse fold by hand, we push the shared edge between the faces and make a valley-like shape. On the other hand, in the case of the outside-reverse fold, we make a triangle cover on the faces. We show simple examples of both folds below.

#### Inside reverse fold

Inside reverse fold

Steps 1 ~ 4 are preparatory. We want two overlapping faces that shared an edge.

We should note that the faces form a stack of layers. We slice the collection of faces, and show each slice from top (level 1) to bottom. We push edge EC and insert faces 6 and 4 in between faces 7 and 5. Our next task is to make the superpositions precise.

We see that there are two levels of the stack of faces. The top-level slice consists of two faces, i.e., ΔCEF and polygon ADFE. The numbers put in the center of the polygons identify the faces and are called face id. The second level, i.e., the bottom level layer, consists of two polygons (one is a triangle). Each is identified by face id 5 or 4. In geometry, vertices are often represented by the point’s name and edges by the points’ names of both ends. It would be too inconvenient to name faces by the sequence of points’ names. Eos generates unique numerals to denote faces, and we use those numerals, i.e., face Ids, in the Orikoto language.

Now we are ready to invoke InsideReverseFold command with list of faces and the fold line as its arguments.

The command performs two folds; one mountain fold and the other valley fold both along line fold-line EF. However, this would be impossible, if we simulate “fold by hand,” since edge EC is shared by faces 4 and 6. To do the two folds, we need to cut the faces 4 and 6 along edge EC. Since we are practicing e-origami, we will cut EC. When we finish the two folds. We glue the moved) edge and, we are done. The InsideReverseFold command performs this sequence of operations at one stroke. To examine the result of the operation, we use ShowLayers command.

We can rotate the above graphics output and see the the inside of the origami.

#### Outside-reverse fold

Outside-reverse fold

An outside-reverse fold is similar to the inside-reverse fold. The only difference is that the outside-reverse fold applies mountain and valley folds to different sides of face layers. Below, we show an example of the use of OutsideReverseFold command in a verbose mode. In this mode, the output of each sub-steps of the command execution are displayed.

## Squash fold

Squash fold

Examples best describe squash fold. Orikoto provides four kinds of squash fold commands:

1. Squash rightwards to make a square.

2. Squash leftwards to make a square.

3. Squash rightwards to make a triangle.

4. Squash leftwards to make a triangle.

We show (1) and (2 ) as we will use them to construct a flying crane.

1. Squash rightwards to make a square.

2. Squash leftwards to make a square.

3. Squash rightwards to make a triangle.

4. Squash leftwards to make a triangle.

We show (1) and (2 ) as we will use them to construct a flying crane.

In the session below, Steps 1 - 5 are preparatory to construct the four layers. Each layer has a shape of a right triangle, which consists of (smaller) right triangles.

#### Squash fold rightwards

Squash fold rightwards

Let us start with the origami at step 5.

Now, we slide the face 10 rightwards (looking leftwards from the right edge CD) onto face 11 such that segment DE moves onto segment BE. This fold is realized by command SquashFold. We define SquashFold as a Curried function that is to be applied to direction (“L” or “R”), shape (“Square” or “Triangle”), a face list and an an edge list. In this example, {11,10} and {“EC”,”DE”}, respectively. Drawing an analogy of mountain and valley folds, we consider segment DE a ridge and the segment EC as a bottom path. Both segments run on the newly constructed square. Taking those parameters in a structures manner, the SquashFold command here is

SquashFold[“R”][“Square”][{11,10},{“EC”,”DE”}]

When we call the command in the verbose mode, we can see the sub-steps of the command execution. The result of the squash fold is below the message of "Step 10 . " The graphics outputs are displayed in 2D view mode. To see the inner structure of the face layers, we use commnds ShowLayers and ShowLayeredFace.

## Flying crane

Flying crane

A flying crane origami is an exciting example. It is one of the most popular artworks, and it requires the classical folds that we discussed. Making a fine flying crane by hand is a challenge for beginner origami hobbyists. It involves a considerable degree of skill and gives us a sense of accomplishment when we complete the construction. In the context of computational origami, this example poses yet another challenge in modeling a new class of folds.

In the following, we give the entire steps of constructing a flying crane in Orikoto. Some program codes are added in the description to help us view the internal origami structure.

In this example, we specify the origami surfaces as yellow and textured patterns to make the origami more artistic. A short program code to specify the colors and patterns is not included here,however.

### Start of construction

Start of construction

Orikoto uses many global (in the context of Orikoto`) variables that change the evaluation environment . All user - accessible Orikoto global variables have a name that start with character $, obeying the convention of Wolfram Language . For example, $displacement below specify the location of a point names .*)

The size of the origami does not matter since we do not explicitly use the underlying coordinates. We set it 16.

The essential steps in constructing the crane are to make two overlapping rhombuses. We make them using the petal folds. The rhombuses stretch from NW to SE of the original sheet of paper. Many constructed shapes are symmetric along the diagonal line from NW to SE of the rhombuses. We will have pairs of similar operations; one operates on the left of the diagonal line and the other on the left.

### Petal fold

Petal fold

#### Preparation for a petal fold

Preparation for a petal fold

We are about to apply a squash fold to make a square on the upper half of the right triangle. We have already seem this situation in the subsection of Squash fold rightwards to square.

#### Squash fold rightwards on the front side

Squash fold rightwards on the front side

#### Squash fold leftwards on the back side

Squash fold leftwards on the back side

The following squash fold moves the target faces leftwards and then make the squashed part a square.

We now have four-layered square.

#### Preparation for constructing legs

Preparation for constructing legs

We are in the second phase of the petal construction. We bisect the ∠ EBF2 to make one side of a petal. We superpose the two lines to bisect an angle formed by them. One of Huzita-Justin’s rules can do this. The following command tries to superpose the lines extending segments F2B and EB.

Similarly, we obtain the crease BH1.

#### Left leg by inside reverse fold

Left leg by inside reverse fold

Similarly, we prepare the arguments of a face-Id list {17,19} and ray H1B, to make the left part of △ BG1H1.

When we rotate the faces 18 and 26 by -π degree along ray H1G1, the petal shape appears on the front side. Note that the fold is a valley-fold along H1G1.

#### Right leg by inside reverse fold

Right leg by inside reverse fold

The subsequent steps 32 - 43 are operationally the same as steps 19 - 29.

We have obtained the desired petals.

### Leg construction

Leg construction

We proceed to construct the leg parts.

#### Head-side

Head-side

Here we use names w1 and w2 to mark the point of intersection since those names are not necessarily visible. Orikoto, by default, does not display mark points whose names start with a lower-case letter.

#### Tail-side

Tail-side

We use names w3 and w4 to mark the points of intersection for the same reason as in the head-side construction.

#### More on head-side

More on head-side

#### More on tail-side

More on tail-side

### Right leg

Right leg

### Left leg

Left leg

### Bill construction

Bill construction

#### Preparation for bill construction

Preparation for bill construction

Let us examine the current origami by command ShowOrigami. It displays the origami only with points specified by named parameter MarkPoints. Points U and V mark the corners of wings and legs.

To make the crane bill on the right-side leg, we will put a pair of points on each edge of the lifted leg. To locate the positions of the pair of points on each edge, we use the geometric algebra g3 \cite{hestenes : 1986, Ida:2016}. A Mathematica implementation of g3 is, by default, included in Eos. In g3, a point is realized as a 1-vector. Since we often need the position of a point, we use a location vector, i.e., the starting point of a vector is the origin of the underlying coordinate system. We use NewVec command to create a 1-vector from a point. We define three 1-vector vA, vF2, and vV corresponding to points A, F2, and V, respectively.

G3Lineine[X, Y] [t] defines a directed line in parameter t that passed through points V and A. G3Line is defined in the package g3.

NewVec[P-> V], where P is a point name and V is a 1-vector that associates P with V.

Here, the values 0.7 and 0.65 are arbitrary, as long as Z1Z2 defines the segment along which we can fold to the bill of the crane .

In[]:=

We make crease Z1Z2 to prepare for command InsideReverseFold .

At this point, we could say that we have completed the construction of a flying crane origami. We can open both the wings outwards so that it looks like flying. However, as a renowned physicist K. Fushimi, who also took an interest in origami, remarked, the elegance and the simplicity of traditional origami come partly from the property that many origami artworks are flat, i.e., a stack of bounded planes.

We keep going further and open the wings.

### Wing construction

Wing construction

Furthermore, we can hide markpoints and face Ids.

## Variations

Variations

With another pattern of textures, we can generate various flying cranes. We do not have to change the values of parameters, such as the coordinate of the points. We have only three free parameters in this construction.

## Concluding remarks

Concluding remarks

We have shown an application of Eos-implementation of traditional origami “flying crane.”

Eos (E-origami system) extensively uses Mathematica's powerful symbolic, algebraic, and graphics capabilities.

We use the new modeling of origami described in our article \cite{ida:2021}. By introducing operations of cutting and gluing the edges of origami faces, we can clarify the notion of fold in classical origami.

## Acknowledgements

Acknowledgements

We appreciate the efforts of Hidekazu Takahashi, Asem Kasem and Fadoua Ghourabi . Their works result in their own Ph . D.

Eos projects has been supported (as a foudational research grants) by JSPS 2002- .

## Initialization Cells

Initialization Cells

### Load Eos

Load Eos

### EosNotations

EosNotations

### Orikoto Notations

Orikoto Notations

### g3Notations

g3Notations

### Extra

Extra

### Extra2

Extra2

### Texture mapping to origami crane

Texture mapping to origami crane