1. Introduction
Paper folding offers rich computational geometry problems with many real-world applications [
1]. The topic, typically referred to as
computational origami or
mathematics of paper folding [
2,
3], studies both feasibility problems and also structural problems [
4,
5,
6] with the aim to illuminate the connections between physical structures/problems and mathematical geometric objects (see, e.g., [
7,
8]). As geometric construction using straightedge and compass offers elegant connections between algebra and geometry, paper folding, which can be seen as geometric construction with additional operations, may provide beautiful structural properties worth studying (e.g., see [
2,
9]).
Akitaya, Ballinger, Demaine, Hull, and Schmidt [
4] previously considered two folding problems on a convex piece of paper
P. Given a query point
p inside
P, their first problem, originally proposed by Haga [
10,
11,
12], called
points to a point, is to find a region containing
p bounded by creases after fold-and-unfold of each corner of
P onto
p. Their second problem, called
lines to a line, takes as an input a line
ℓ inside
P and the goal is to find a region containing
ℓ bounded by creases after a fold-and-unfold of each side of
P onto
ℓ. Although these two problems share a similar structure, they find that the outcomes diverge. That is, the region in the first problem resembles a Voronoi cell [
13] with the inner point and corners as seeds, while the region in the second problem relies on the straight skeleton of the piece of paper.
We consider a variant of this folding problem in the same flavor, i.e., we are given a query point f inside P and we are interested in a region containing f bounded by creases after a fold-and-unfold of every point on the boundary of the paper onto f. We call this result region a safe region R since every point is safe from this folding procedure. Our contributions are an analysis of the shape of R, an efficient algorithm for finding R, and a complexity of the safe region with respect to any query point f.
Figure 1a shows a few creases after folding various points on polygon edge
onto point
f. The resulting safe region is shown in
Figure 1b.
Figure 2 provides a comparison between point-to-point folding considered in Akitaya et al. [
4] (in
Figure 2a) and our work (in
Figure 2b).
We first show that, although we fold infinitely many points on
, the result region
R can be described finitely. It is a well-known result that a fold-and-unfold of multiple points from a line onto a point produces an envelope of a parabola. Thus, we consider each “side” of
R as a parabolic arc instead of a traditional straight line segment. The analysis is presented in
Section 2.
Using the analysis of the properties of safe regions, we present a linear-time algorithm for finding the region
R, given a piece of paper
P as a sorted list of
n corners in counterclockwise order. Our algorithm works similarly to Graham’s scan for a convex hull. That is, we consider adding one side of
P as a parabola arc at a time, maintaining the loop invariant that regulates the region
R. During each iteration, we may destroy some of the previously added parabola arcs. The key insight is that the destroyed parabola arc must be the one that is closest to the newly added parabolic region. Thus, it allows us to amortize the cost of destroying, achieving a linear-time algorithm overall.
Section 3 explains the algorithm in full detail.
Finally, given any potential query point
f, we calculate the precise number of parabola arcs of the region
R. They turn out to be dependent on a set of inscribed circles, each of which is centered at a node of the straight skeleton of
P. We dedicate
Section 4 to focus solely on this property.
We hope that our problem will expand the richness of the family of fold-and-unfold origami problems. Nevertheless, it could serve as a
bridge joining the previous two problems from [
4], since our problem statement is similar to their first problem, but our result is similar to their second problem.
2. Preliminaries
In this section, we provide a formal definition of the problem. We are given a convex polygon P as an ordered list of vertices in counterclockwise order. We shall treat the list as a circular list. Given two points a and b, we refer to a line segment whose ends are a and b as a segment . Equivalently, the polygon P is also represented as a list of edges , where is a line segment joining and . We denote its boundary as , i.e., .
We are also given a point
f strictly inside
P. Consider a point
on edge
. Folding
u onto
f results in a straight line
L, referred to as a
crease line, which passes through the middle point on the line segment
and is also orthogonal to
. We are interested in the set of crease lines when folding every point on
onto
f. The envelope of this family of crease lines corresponds to a parabola, whose focus is
f and directrix is a line resulting from extending the segment
to a line. We refer to this parabola as
. See
Figure 3.
To see this, let line be erected perpendicularly to the directrix at point u, and let . We have , which indeed obeys the definition of parabolas. In other words, is a point on a parabola’s curve. Furthermore, for every point such that , the point v is “safe” from other creases produced by fold-and-unfold of every other point from this directrix, which is a line extension of the segment .
Since divides the plane into two parabolic half-planes, we are interested in the region containing f. We define a half-space to be the half-plane containing f. More formally, contains all points v such that , where u is an orthogonal projection of v on the line extension of .
Our goal is to find:
defined to be the
safe region. When focusing on point
f, we sometimes refer to the safe region with respect to point
f as
.
We describe the algorithm in
Section 3. Later in this section, we state relevant geometry facts.
2.1. A Parabola as a Projection of a Conic Section
A parabola can be viewed as a conic section, i.e., a curve on a surface of a cone intersecting a cutting plane tilted at the same angle as the cone. Analytically, we consider a Euclidean space
. A
cone is a surface satisfying the equation:
with an apex of the cone at the origin. A
cutting plane can be defined with an equation:
where
r is the distance on the
-plane from the cone’s apex to the nearest point of the cutting plane, and
is the
directional angle on the
-plane to that point. By this definition, we have a parabola as a curve on the tilted cutting plane. See
Figure 4a,b.
A projected parabola is an orthogonal projection of the tilted parabola onto the
-plane, which is also a parabola. The projected parabola has the cone’s apex as its focus, and an intersect line of the cutting plane with the
-plane as its directrix. This projection viewpoint was briefly mentioned at the end of [
14]. In this paper, we refer to projected parabolas simply as parabolas.
We say that parabola p is in the upright form if, by rotating and translating the -plane, the parabola possesses an analytical form of where .
2.2. Two Parabolas
We define semi-confocal parabolas as a family of parabolas that share the same focus, but their directrixes do not need to have the same directional angle. It follows that semi-confocal parabolas are projected parabolas from multiple cutting planes that cut the same cone. We state two important facts on intersections of two parabolas which, under the conic interpretation, are straightforward.
Lemma 1. Two semi-confocal parabolas do not intersect iff their directional angles are the same.
Proof. Two parabolas with the same directional angle are produced from two parallel cutting planes in the conic view, which never intersect. □
Lemma 2. If two semi-confocal parabolas intersect, then they intersect at two points which also lie on an angle bisector of their directrixes.
Proof. Take conic section interpretation. Their curves on the surface of the cone must also lie on their cutting planes, in which the intersection of the planes is a straight line. This line piece goes through the cone exactly two times. See
Figure 4c,d. □
It follows from Lemma 2 that two intersecting semi-confocal parabolas produce a safe region which is a bounded convex region. Moreover, since we only deal with parabolas whose directrixes are from boundary edges of a convex polygon, the non-intersecting case never occurs.
Given two parabolas and , we can compute their intersections using analytical techniques in time as follows. We reduce the problem of finding intersection of two parabolas to the problem of finding intersection of a parabola and a line. Without loss of generality, we consider in the upright form. From Lemma 2, we find an angle bisector b such that it divides the inner angle between edges and . Then, we find the resulting intersections of and b using quadratic equations.
We remark particularly on the structure of the safe region R.
Consider each parabola
in the upright form. We can partition this parabola using the two intersection points into three arcs: the
left arc, the
central arc, and the
right arc, where the left arc corresponds to the half-parabola unbounded to
and the right arc corresponds to the half-parabola unbounded to
, and the central arc lies between the two intersection points (see
Figure 5). Under this notation, we note that the left arc of
intersects
only once at the intersection point where it also intersects the right arc of
, and vice versa.
In our analysis, where there are parabolas
, we refer to the two intersection points between parabolas
and
as
and
. To distinguish between these two points, imagine if one traverses counterclockwisely on the boundary of
, then one would see an arc of
, the intersecting point
, the arc of
, and then the intersection point
. The counterclockwise definitions of these points are crucial to our proof of Lemma 4. See
Figure 4d.
2.3. Many Parabolas
In this section, we analyze the structure of the intersection of k semi-confocal parabolas, extending the result from the previous section.
Let be k semi-confocal parabolas with different directional angles. We shall consider the safe region of these parabolas and prove the following lemma.
Lemma 3. Each parabola touches at most one arc of the safe region.
Proof. We prove by induction on k for the case where follows from Lemma 2. Consider k parabolas. Let . Inductively, each parabola touches at most one arc of . We consider , we shall show that only touches at most one arc of R. If , then and does not touch R; hence, the lemma is true. We then assume that .
Clearly, touches one arc of . We call that arc . Each endpoint of belongs to some arc of .
There are two cases.
Case 1: Both endpoints of belongs to a single arc of . In this case, intersects exactly one arc of exactly twice. Then, the safe region R is the intersection of exactly two parabolas, i.e., . Thus, the lemma follows from Lemma 2.
Case 2: One endpoint of belongs to while the other belongs to . We show that in this case, intersects exactly two arcs, implying the lemma. We consider first, i.e., we look at the intersection . Let be the intersecting point of and . We can partition into three arcs; let be the unbounded arc starting at . From Lemma 2, we know that only intersects once. Since , we have that also intersects R at most once at . We follow the same argument for . Thus, only intersects exactly twice, as claimed. □
3. The Algorithm
Our algorithm for finding a safe region works similarly to Graham’s scan [
15] for convex hull. We briefly described the algorithm as a pseudocode in Algorithm 1. Later in this section, we explain the algorithm and prove its correctness.
Algorithm 1: Our algorithm for finding the safe region. |
|
Algorithm 1 uses the following subroutines. Subroutine creates a representation of a parabola with f as its focus and a line extension of edge e as its directrix. Subroutine computes the intersection point of parabola and ; we recall that from Lemma 2, there are two intersection points and this subroutine returns the “inner” one, i.e., , not .
Since our goal is to find a safe region,
Algorithm 1 iterates over parabolas
producing a partial solution
such that:
i.e.,
is the safe region for the first
i parabolas. We maintain
as a cyclic list of parabola arcs:
where each arc
is a 3-tuple
which keeps a reference to the parabola
, its left endpoint
, and its right endpoint
. We note that with this representation,
for
, and
. We also note that, using the notation defined in
Section 2.2,
is
and
is
.
Initially, we start with
. We encode the partial safe region as an ordered list of arcs,
, where:
For each iteration , we consider adding to to produce . There are three cases:
Case 1: does not change the region, i.e., and we can discard ;
Case 2: clips the region, i.e., all parabola arcs in remain on the boundary of ; or
Case 3: eclipses other parabolas in the region, i.e., some parabola arc is entirely outside .
Figure 6 illustrates these three cases. The safe regions
are shown with additional parabolas
with
as their directrixes.
To distinguish between these cases, our basic procedure is to test if a point lies in
. The counterclockwise ordering of parabolas ensures that
would affect two sequences of arcs, i.e., clockwisely,
to be referred to as the
neighbors to the left of
, and counterclockwisely,
to be referred to as the
neighbors to the right of
,
We first consider point
(which is also
). Lemma 4 below ensures that we are in Case 1 if
. See
Figure 7.
Otherwise, some part of
is below parabola
. We in turns consider the points:
from the neighbors to the left of
and find the largest index
j such that
. In this case, the parabolas
are eclipsed by
.
We also process the neighbors to the right of similarly by finding the smallest index such that together with the sequence of eclipsed arcs . We note that it can be the case that when only one arc survives eclipsing.
To construct , we discard eclipsed arcs, add a new arc for , and compute the following:
The left intersection point , which is the intersection between and ;
The right intersection point , which is the intersection between and .
Finally, we re-index the arcs in . We quickly remark that this procedure can be seen as a “twin-headed” Graham scan.
The following lemmas show that this procedure is correct.
Lemma 4. If , then and .
Proof. Since , our goal is to show that in this case.
Consider the intersection of and . Recall that the two intersection points and partition both parabolas into their left arcs, central arcs, and right arcs. Let us call them and .
We now consider the intersection of and . We show that , the intersection point of and , is on the left arc of . To see this, we start by rotating the plane such that is in the upright form. Then, we find a region . Since and also , in on the boundary of . Again, since and also on the boundary of r, traversing from on the boundary of r clockwisely with respect to f would reach , by definition of , as claimed.
Using the same argument, we can show that is in the right arc of .
Using
and
, we partition
into three arcs—
and
—so that
is an unbounded curve with
as its end point,
is a bounded part with
and
as their end points, and finally,
is an unbounded curve with
as its end point (see
Figure 7).
Using the structure from Lemma 2, we know that intersects at only . Thus, does not intersect .
Additionally, we know that intersects at only , implying that does not intersect .
We can conclude that does not intersect with because lies between the unbounded curves and . □
We also have a simple contraposition.
Corollary 1. If , then .
Let be the correctly updated solution, we would like to show that constructed above equals . We remark that the i-th parabola corresponds to edge that comes counterclockwisely after all other edges that contribute to .
Lemma 5. If , the arcs on ’s boundary which do not belong to form a consecutive sequence: Proof. Lemma 3 ensures that if intersects the boundary of , touches at most one arc of , the result of the intersection of and . This implies that the arcs of do not belong to form a (circular) consecutive sequence. To see this, assume otherwise and note that in that case, would touch more than one arc of .
Our procedure finds the consecutive sequence starting at , the intersection of and , then iterates through other consecutive points. Thus, the procedure is correct if the starting point is correct, i.e., we start at some intersection point outside . This is indeed the case because Corollary 1 guarantees that when , is outside . □
We conclude with our main correctness theorem.
Theorem 1. Our updating procedure is correct, i.e., , and the algorithm computes the safe region in linear time.
Proof. Regarding the updating procedure, we deal with three possible cases. Lemma 4 ensures that our condition for Case 1 is correct. In other cases, Lemma 5 shows that the procedure for deleting arcs is correct. By induction on n, the algorithm thus produces the required safe region.
To analyze the running time, we first note that, except the two inner while loops, for each i, the algorithm runs in time. To account for the running time of the inner while loops, observe that each iteration of the loop removes one parabola from the list. Since at most n parabolas are inserted in the list, the deletion can take place at most n times, implying the total running time of for the loops. □
4. The Number of Arcs of the Safe Region
In this section, we consider the complexity of the boundary of the safe region; in other words, we count the exact number of arcs of the safe region. From previous sections, we derive that a side of the safe region is a parabolic arc with point f as its focus. We also see that some edge of P may not contribute to the resulting safe region, i.e., a parabola associated with it does not touch the safe region. It is natural to ask for the number of arcs of the safe region.
Assuming that the polygon
P is fixed, the number of arcs of the safe region depends on the focus
f. We denote explicitly by
a safe region with point
f as its focus. As in [
4], this section analyzes the number of arcs of safe region
, i.e.,
, where
is the set of arcs of
.
Figure 8a shows two safe regions
with query point
and
with query point
.
Akitaya et al. [
4] consider the same problem for the case where each side of
P is folded onto a line. They show that the straight skeleton of
P plays an important role in determining the number of sides of the resulting region. This is true for our case as well. As an example,
Figure 8b shows an inscribed circle
C which can be determined using the straight skeleton and two safe regions shown previously. We remark that
but
.
We start by defining useful notations related to straight skeletons and event circles. A
straight skeleton [
16] of a polygon
P, denoted by
, is a subset of
P such that for each point
, there exist at least two points on
with the same distance to
u. More intuitively, we may see the skeleton as a Voronoi diagram of line segments where each site is an edge of the polygon. The straight skeleton
partitions
P into regions, referred to as
faces. Thus, under the Voronoi interpretation, each face is bounded by exactly one polygon edge as other edges of
. We refer to a face that is bounded by polygon edge
as face
. We also note that a face is also a convex polygon. See
Figure 9 for an illustration.
The skeleton may be viewed as a tree, where each non-leaf node ensures at least three equidistant points on . A non-leaf node of is referred to as an event point. A circle centered at an event point and tangential to the nearest edge of the polygon is called an event circle of . Let be the set of all event circles of , and let be a set of event circles tangential to edge e. We also denote by an interior of circle C, i.e., the set for a circle with center and radius r.
The goal of this section is to show that, under the fixed polygon P, the structure of is governed by event circles of straight skeleton of P.
We start by analyzing the case when the safe region intersects with the skeleton faces. The following lemma directly follows from the Voronoi interpretation of the straight skeleton.
Lemma 6. For each event circle C with event point c, c is adjacent to face if and only if its corresponding polygon edge is tangential to C.
The following two lemmas provide basic properties for our main theorem in this section.
Lemma 7. For a particular focus f, intersects with skeleton face adjacent to edge iff the associated parabola is part of the arcs of .
Proof. Assume that
intersects
. Since
is bounded by a polygon edge and
is contained in
P, we know that there are parts of the boundary of
that intersect
. Consider any point
u on the boundary of
inside
. Clearly,
u must be on an arc of some parabola, i.e., we have that:
where
is an orthogonal projection of
u onto
. Since all points in
are closer to
than other edges, the minimizer of the above term is
; thus,
u must also lie on
, i.e.,
is part of arcs of
.
We prove by contradiction. Assume that
does not intersect
, but
is part of the boundary of
. Consider any point
on the boundary. Since
is disjoint from
,
u is strictly in some face
. In this case, we have that:
where
and
are orthogonal projections of
u onto
and
, implying that
, a contradiction. □
Lemma 8. For with event point c, a safe region strictly contains an event point c, i.e., , iff .
Proof. Let r be the radius of an event circle C. Project c orthogonally to a line extension of every edge , named the projected point .
Assume that , i.e., . We show that for every parabola associated with polygon edge . This is the case when r is strictly closer to f than every other edge . Consider each edge tangent to C, we have . For edge not tangent to C, we have that ; thus, . Hence, c is in the safe region .
Assume that . In this case, we have . Since C is an event circle, there exists edge tangent to C. For that particular edge, we have . Thus, , and c is not strictly contained in the safe region . □
The following theorem gives the number of boundary arcs of as a function of event circles containing f.
Theorem 2. If f is strictly inside some event circle, i.e., for some , then:Otherwise, . Proof. We first assume that for some event circle C. Consider each event circle C with event point c such that . From Lemma 8, we know that . This also means that intersects every face adjacent to event point c. Lemma 6 ensures that these faces ’s correspond with edges ’s tangent to C, the set of edges such that . Since Lemma 7 ensures that for each face adjacent to edge intersecting with , the parabola appears as an arc of , we have that for each tangent edge of C, its parabola appears as an arc in . The lemma, in this case, follows by taking the union of all boundary edges from every event circle that f is strictly inside.
On the other hand, if f is not strictly contained in any event circle , Lemma 2 ensures that the safe region must touch two parabolas. □
Figure 10 shows an application of Theorem 2. The event circles are shown with their intersections. From Theorem 2, for each point
f, the number of arcs of
depends on the number of edges tangent to event circles containing
f. Thus, every point
f in a particular intersection of event circles has the same value of
. Each intersection in
Figure 10 is shown with a different color depending on the value of
for a query point
f inside it. Remark again that for query point
f in the area outside any event circles, the value of
is 2.
Alternatively, one may view Theorem 2 with the conic section interpretation as follows. The input polygon P induces n cutting planes, forming the straight skeleton and their corresponding faces when projected onto the -plane, and the point f is represented as a cone whose apex is at f.
The structural results in this section give another linear-time algorithm for finding safe regions, by first finding straight skeleton in
-time using [
17], then computing event circles, and finally using this information to find the set of edges contributing to the arcs of the safe region. However, we believe that the results in this section contribute mainly to the structural understanding of the problem and may serve as a guideline for tackling harder problems, especially the non-convex case of the problem. We discuss this in
Section 5.1.