
IlliPaper: a Study of Origami 
Yana Malysheva

My part in this collaborative project (also known as Origami Graphics) was to convert IlliSkel into a program that would make a simple origami piece out of a virtual piece of paper. The origami piece we chose was the fortune teller a paper toy of roughly prismatic shape with four moving parts.
It was a good piece to program because it is very symmetrical. Also, the folds create 32 identical 45-45-90 triangles, with a hypotenuse of length sqrt(2)/4 (in a 2 by 2 square) which are arranged in a very convenient way(see picture below).
The Fortune Teller: how humans make it
This is how the fortune teller is usually made out of a real (square) piece of paper:




The Fortune Teller: how the computer makes it.
The program first creates a 2 by 2 square in the x, y-plane in 3D, with all the folds already made:
![]()
Then it folds 180 degrees along the four lines that make the corners go to the center. Next, it folds -180 degrees along the lines that make the new corners go to the center. Finally, it performs the
umbrella move, called so because it resembles an umbrella being folded, to get the final result.The implementation.
The paper.
The virtual 2 by 2 piece of paper actually consists of 32 little triangles with 25 shared vertices and small gaps between them(the triangles). The gaps create all the folds needed for the Fortune Teller. The positions of the vertices are stored in a 5 by 5 by 3 matrix of floats; there is a draw function which draws the current position of the figure according to the positions of the vertices.
A helper function for draw actually draws two triangles for each appropriate set of 3 vertices: one red and one green. This is done so that the "paper" is green on one side and red on the other. The function also draw a number(1-32) in front of every triangle.
The folding.
The first eight steps are all simple folds, and so they all use the same function, bend, and its helper function, rotate. The bend function takes as parameters a degree and two points in 3D (arrays of floats of length 3); the two points specify the line along which to fold. The function determines which vertices are to be rotated around the given axis and in which direction, and then calls the rotate function on those vertices, which performs the actual rotation(changes the numbers in the appropriate parts of the vertex matrix)
Bend.
The bend functions parameters are: deg number of degrees to rotate; p1[3], p2[3] the coordinates of the points that define the line around which to rotate.
The function decides which way to rotate the points by two things: whether the slope of the line is positive or negative, and on which side of the center of the square the line is on.
It then decides which points to rotate by looking at each points x and y coordinates; if the point is on the other side of the line than the center, it rotates that point. That way, the center never moves during folding.
This method of finding the points to rotate has a disadvantage: if the paper is already bent at least 90 degrees at the line we are attempting to fold again, then the x,y coordinates of the points we want rotated will be on the same side of the line as the center. That means that we cant fold along a line once we have folded along it more that 90 degrees. But that does not matter for the Fortune Teller (as well as most other origami figures), since we are only making 180 degree folds and only to(locally) flat structures.

Rotate.
The rotate function rotates a given point, v, around a line defined by two points, p1 and p2, deg radians. This is the idea that is used in the calculations:
The line around which to rotate is represented by a unit vector, (p2-p1)/|p2-p1| ; the vertex rotated can then be represented as a vector from p1 to v; once that vector is rotated, we can add it to the position of p1 to get the final answer.

The umbrella.
The umbrella move converts the flat folded structure that is formed after the first 8 steps into the final 3D fortune teller. It works by pulling the four corners of the flat structure together, kind of like folding a square umbrella with flaps sticking out.
It can also be thought of (and this is how the raise function works) as the reverse of going from the completed structure to the structure after all 8 folds are done by pushing down on the center. This is achieved raising the center of the structure, while keeping the four corners at z=0 and keeping all distances between adjacent vertices constant.
For center, legs, points between center and legs, and corners defined like this:

This is what raise(x) does:
The center.
Increase the z-coordinate of all the vertices in the center by x, unless that exceeds the limits(it has to be between 0 and sqrt(2)/2); if it does (exceed the limit), set the z-coordinate to whichever limit you were trying to exceed (that is, if lowering too low, set to 0; if raising too high, set to sqrt(2)/2). Now call the current z-coordinate of the center h (for height). It will be useful for finding all the other points.
The legs.
To find the position of the legs at an arbitrary h, we note these facts:
- z=0 at all times by definition of raise function.
For every leg, either x=y or x=-y; also, |x|=|y|=n, n is the same for all legs and 2n= the distance between two adjacent legs. This is all true because of symmetry. From this we conclude that the coordinates of the legs are (n,n,0), (n,-n,0), (-n,-n,0), (-n,n,0).

- Finally, we know that the distance from the center(0,0,h) to a leg is sqrt(2)/2; so, (|n|-0)^2+(|n|-0)^2+(0-h)^2=(sqrt(2)/2)^2;
2n^2+h^2=1/2;
n=sqrt((1/2-h^2)/2).
Now we know the positions of the legs; n will be useful in finding other points.
Points between center and legs.
Because of symmetry:
z is the same for all four points (=z1).
For every point, one of x and y is 0, and the absolute value of the other=x1, where x1 is the same for all four points.
Then, the points are: (x1,0,z1), (0,x1,z1), (-x1,0,z1), (0,-x1,z1).
Now to find x1 and z1.

As the picture suggests, the side view(with flaps deleted) contains two (useful) right triangles: the bottom one with sides h, n, sqrt(h^2+n^2), the top one with sides _, sqrt(n^2+1/4), sqrt(n^2+1/2) .
We can find a by using the right triangles: a =arctan(n/h)+arctan(sqrt(n^2+1/4)/(1/2));
We can find z1 and x1 using a : z1=h-1/2cos(a ), x1=1/2sin(a )
That means we can find x1 and z1, and then the coordinates for the point. * x1 and z1 will be useful.
The corners.
By symmetry, |x|=|y| and z is the same for all four corners; we know that (for x, y pos.) (x-n)^2+()^2+z^2=1/2;
2(x-n)^2+z^2=1/2.
Now, if we know either x or z, we can find the other one quickly. To find z, we look at the diagonal view of the figure with flaps removed.

(l=n*sqrt(2) here)
In the right half of the graph, the two triangles are identical. They are also symmetrical along the dotted line. This means that to find the point at the corner, we can reflect the point (0,h) along the black dotted line represented by points (L, 0) and (x1/2,z1). For that, we find the equations for the dotted line and the green line, find the coordinates of their intersection, and add to those coordinates the vector from (0,h) toto the intersection. After calculations we get:
z1^2h+z1*l(l-x1/sqrt(2)))
y = ----------------------------------
1+(l-x1/sqrt(2))/z1^2
Since the y-coordinate in this plane is the same as the z-coordinate in 3D, y= z-coordinate of the point. We can then find the x and y coordinates by using the equation in the beginning.
After these four sets of vertices are adjusted, raise(x)is completed.
--------------------------------------------------------------------------------------------
note: I made some minor changes to the program since the presentation.
First of all, the first eight steps were done upside down before; I fixed that. (that accounted for part of the problem with raise the turning inside out part. The second part is wrong corner coordinates)
Second I created a copy of ori4, ori4a; the difference is the points-between-etc. calculations (ori4a uses calculation described here, ori4 a calculation involving distances from adjacent vertices); running doesnt seem to be different,
Finally, I found an error in the calculations of the corners. (I dont know what I did the first time; but I recalculated it and it turned out different.)
Bibliography:
Peter Engel, Origami from Angelfish to Zen. New York: Dover Publications, 1994
http://www.amazon.com/exec/obidos/ASIN/0486281388/
Kunihiko Kasahara, Origami Omnibus. [Tokyo]: Kodansha International, 1998
http://www.amazon.com/exec/obidos/ASIN/4817090014
Rick Beech, Origami: The Complete Guide to the Art of Paperfolding. New York: Lorenz Books, 2001
http://www.amazon.com/exec/obidos/ASIN/0754807827
Yuri and Katrin Shumakov, Oriland
http://www.oriland.com/index.aspOrigami Fortune Teller.
http://origami.kvi.nl/models/toys/fortune/fortune1.gifOrigami Fortune Teller.
http://www.yasutomo.com/project/fortuneteller.htmlFortune Teller Template.
http://www.funorama.com/files/fortune.pdf