To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
In this chapter, we consider two of the simplest types of crease patterns, with the goal of characterizing when they arise as the crease patterns of origami, particularly flat origami (see Figure 12.1).
In the first type of crease pattern, all creases are parallel to each other. In this case, the shape of the paper is not important, so we can imagine a long thin strip of paper with all creases perpendicular to the strip. In fact, we can imagine the paper as one-dimensional, a line segment with points marking creases.
In the second type of crease pattern, all creases are incident to a single common vertex. Again, in this case, the shape of the paper is irrelevant, so we view it to be a unit disk centered at the sole vertex of the crease pattern. At a high level, the two types of crease patterns are related: the first type is a limiting case of the second type in which the radius of the disk is infinite.
We explore two natural problems about flat foldings of either type of crease pattern:
Characterize which of the crease patterns can be folded flat, that is, for which there is a flat folded state using precisely those creases.
For each such flat-foldable crease pattern, characterize which mountain–valley assignments correspond to flat foldings.
After seeing that many fundamental linkage reconfiguration problems are intractable, we specialize in this chapter to the simplest situations, where polynomial-time—sometimes even linear-time—algorithms are possible.
We start in Section 5.1 by exploring from Table 1.1 the simpler end of each spectrum: the simplest linkage graph stucture, an open chain; the simplest intersection constraints, none; the simplest dimension, 2D; and the simplest problem, reachability. In Section 5.2 we continue to permit the chain to cross itself, but not a surrounding boundary. Finally, we initiate the exploration of reconfigurations of chains that avoid self-intersection in Section 5.3, saving the richest topic (locked chains) for Chapter 6.
RECONFIGURATION PERMITTING INTERSECTION
Chain Reachability
Let C be an open chain of n edges/links ei, with lengths |ei| = ℓi i = 1, 2,…, n, and with n + 1 vertices/joints v0,…, vn so that ei = vi−1vi (see Figure 5.1). Such a pinned chain is often called an arm (or “robot arm”), with v0 the shoulder joint and vn the hand. Fix v0 at the origin of a coordinate system.
Connectivity of Configuration Space
The configuration space of this arm C is certainly connected. From any configuration with n ≥ 2links, we can rotate the last link en to become a collinear extension of the next to-last link en−1. Then the arm can be viewed as an arm with one fewer link, treating the last two links en−1 and en as fused together into a single “virtual link” of length ℓn−1 + ℓn.
Our knowledge about single-vertex flat foldability from Section 12.2 (p. 198) allows us to solve a more general problem involving local foldability of vertices in a general crease pattern (on a flat piece of paper). A vertex in a crease pattern or mountain–valley pattern is locally flat foldable if we obtain flat foldability when we cut out any region containing the vertex, portions of its incident edges, and no other vertices or edges. We can make the canonical choice for the cut-out region of a small disk centered at the vertex. Thus local flat foldability of a vertex is equivalent to single-vertex foldability in a crease pattern or mountain–valley pattern obtained by restricting the larger pattern to the creases incident to the vertex.
We can easily determine whether every vertex in a crease pattern or a mountain–valley pattern is locally flat foldable: just test each vertex according to the algorithms in Section 12.2. The catch is that while every vertex in a crease pattern may be locally flat foldable, each vertex might require its own local mountain–valley assignment. The more interesting question, the local flat foldability problem, is to determine whether a general crease pattern has one, global mountain–valley assignment for which every vertex is locally flat foldable. Bern and Hayes (1996) showed how to solve this problem by finding one such mountain–valley assignment, or determining that none exist, in linear time.
We now turn to chains—and more generally linkages—that restrict joint motions in someway. Many physical linkages have some type of joint-angle constraint, for example, robot arms (Figure 1.2, p. 12). Among the variety of possible constraints, we concentrate in this section on just two: keeping all angles between incident links fixed, and keeping all angles convex. Both have applications, and both have led to a rich collection of results.
FIXED-ANGLE LINKAGES
Introduction and motivation. This section is concerned with fixed-angle linkages: linkages with a fixed angle assigned between each pair of incident edges. (We'll use the term linkage to include both general and fixed-angle linkages.) Fixed-angle chains are of particular interest, because, as mentioned in Section 1.2.4 (p. 14), they may serve as models for protein backbones: each vertex models an atom, and each link an atom-to atom bond. The backbone of the protein (ignoring the “side chains”) is an open chain. The bond angles are nearly fixed, leaving one degree of spinning motion. As this is the primary motivation for fixed-angle chains, we will disallow self-crossings to match the physical constraints. The folding behavior of fixed-angle chains is of intense current interest, constituting the unsolved “protein folding problem.” We will more directly address protein folding via fixed-angle chains in Section 9.1.
Fixed-angle trees arise in the same protein models, either when the side chains cannot be ignored, or for so-called “star” or “dentritic” polymers (Frank-Kamenetskii 1997; Soteros and Whittington 1988).
Perhaps the simplest geometric formulation of origami design is to fold a desired 2D or 3D shape from a specified shape of paper (typically square). For example, we may be given the polygonal region shown in Figure 15.1(a) representing the silhouette of a horse, and our goal is to fold a square piece of paper into a flat origami with this silhouette. The origami literature provides countless examples of 2D and 3D shapes foldable from a square piece of paper. Folding a 3D shape can also be thought of as wrapping a general-shape gift.
The desired shape should be made of flat sides–polygonal (in 2D) or polyhedral (in 3D)–to be achievable by finitely many folds of a polygonal piece of paper, but other than this basic constraint, it is conceivable that any shape is foldable from a sufficiently large piece of paper. Although this problem is implicit throughout the origami literature, the problem was not formally posed until 1999 by Bern and Hayes (1996) and that too only in the 2D case. The 3D version–a kind of “gift-wrapping” for complex polyhedral gifts–was implicitly studied as early as 1960, for example, by Gardner(1990, 1995a), but the general problem appears not to have been formally posed in the literature.
A further variation on these problems, introduced by Demaine et al. (2000c), is to suppose that the original piece of paper is bicolored: a different color on each side.
One of the earliest achievements in the field is an algorithm by Schwartz and Sharir that can solve any “motion planning” problem, including essentially any linkage problem. The technique is to explicitly construct a representation of the free space for the mechanism and then answer all questions with this representation. For example, a reconfiguration decision question reduces to deciding if the initial configuration A is in the same connected component of the free space as the final configuration B. An example of the configuration space for a 2-link arm in the presence of obstacles is shown in Figure 2.1. Because each configuration is mapped to a point in configuration space, the complex motion of the arm in (a) of the figure is reduced to the path of a point in configuration space (b). In this case the configuration space is a torus representing two angles θ1 and θ2, each with wrap-around ranges [0, 2π] (see p. 61).
Their original algorithm, developed in the justly famous five “piano mover's” papers, resulted in a doubly exponential algorithm. Subsequent research has improved this to singly exponential. Although we will not employ this algorithm subsequently, it is an important milestone and serves as a baseline for all subsequent work, and so it is worth stating the result more precisely.
Both shortest paths and geodesics are paths on a surface which “unfold” or “develop” on a plane to straight lines. This gives them a special role in unfolding, and underlies the two known (general) unfoldings of a convex polyhedron to a nonoverlapping polygon, the source and the star unfolding (mentioned previously on p. 306). In this chapter we describe these two unfoldings, as well as investigate shortest paths and geodesics for their own sake and for their possible future application to unfolding.
Let P be a polyhedral surface embedded in ℝ3, composed of flat faces. We will insist that each vertex be a “true,” nonflat vertex, one with incident face angle ≠ 2π. A shortest path on P between two points x and y on P is a curve connecting x and y whose length, measured on the surface, is shortest among all curves connecting the points on P. Several important properties of shortest paths are as follows:
There always exists a shortest path between any two points, but it may not be unique: several distinct but equally shortest curves may connect the points.
Shortest paths are simple in that they never self-cross (otherwise they could be shortcut).
The area of rigidity theory studies a special class of problems about linkages: can the linkage move at all? This seemingly simple question has a deep theory behind it, with many variations and characterizations.
This chapter gives an overview of some of the key results in 2D rigidity theory, with a focus on the results that we need elsewhere in the book, in particular, in our study of locked linkages in Section 6.6 (p. 96). A full survey is beyond our scope; see Connelly (1993), Graver (2001), Graver et al. (1993), and Whiteley (2004) for more information.
BRIEF HISTORY
While rigidity theory fell out of prominence for the first half of the twentieth century, since then there has been increasing interest and connections made to applications. Perhaps the first result that could be identified as in this area was Augustin-Louis Cauchy's theorem from 1813 on the rigidity of convex polyhedra, settling part of a problem posed by Leonhard Euler in 1766. This and related results on polyhedral rigidity are covered in Section 8.2 (p. 143) and in Part III, Section 23.1 (p. 341). Another early result in the area is James Clerk Maxwell's work from 1864 on planar frameworks, and it is here that the development in this chapter culminates. In some sense, we follow backward in time, building on the new infrastructure and deep understanding of the area, to make it easier to reach some older and more difficult results.
In this chapter, we discuss aspects of the movements of linkage mechanisms embedded in the plane, permitting links to pass through one another, without obstacles. Our goal is to explain Kempe's universality theorem (Theorem 3.2.1).
STRAIGHT-LINE LINKAGES
In preparation for presenting this universality result, we discuss the fascinating history of the design of linkages to draw straight lines, which led directly to Kempe's work.
Degrees of Freedom
Linkages that have a point that follows a particular curve have 1 degree of freedom, that is, the configuration space is one-dimensional. We consider two types of joints: pinned and unpinned or free. Both are universal joints, but a pinned joint is fixed to a particular point on the plane. Let a linkage have j free joints and r rods (or links). Pinned joints add no freedom, a free joint adds 2 degrees of freedom, and a rod removes 1 degree of freedom if it is not redundant (Graver 2001, p. 135). Thus, if all rods are “nonredundant” (a common situation), a linkage has 2 j — r degrees of freedom. Thus, to follow a curve, a linkage should have r = 2 j — 1 rods; in particular, it must have an odd number of rods.
Watt Parallel Motion
It was a question of considerable practical importance to design a linkage so that one point moves along a straight line, a motion needed in many machines, for example, to drive the piston rod of a steam engine.
In this chapter we present three fundamental theorems on the structure of convex polyhedra that are essential to understanding folding and unfolding: Steinitz's theorem (below), Cauchy's rigidity theorem (Section 23.1), and Alexandrov's theorem (Section 23.3). It will be useful to view these results as members of a broad class of geometric “realization” problems: reconstructing or “realizing” a geometric object from partial information. Often the information is combinatorial, or combinatorics supplemented by some geometric (metric) information. A classic example here is “geometric tomography” (Gardner 1995b), one version of which is to reconstruct a 3D shape from several X-ray projections of it. When we fold a polygon to form a convex polyhedron, we have partial information from the polygon and seek to find a polyhedron that is compatible with, that is, which realizes, that information.
Steinitz's theorem. The constraints on realization available from purely combinatorial information are settled by Steinitz's theorem. The graph of edges and vertices of a convex polyhedron forms a graph (known as the 1-skeleton of the polyhedron).
Theorem 23.0.3. G is the graph of a convex polyhedron if and only if it is simple, planar, and 3-connected.
It is not so difficult to see that the three properties of G are necessary: G is simple because it has no loops or multiple edges; it is planar by stereographic projection, and it is at least plausible that the removal of no pair of vertices can disconnect G.
Higher dimensions are just beginning to be explored. Here we touch on extensions to higher dimensions in all three parts of the book.
PART I
1D (one-dimensional) linkages in higher dimensions have been explored for certain problems. For example, many linkage results that permit crossings generalize to higher dimensions, such as the annulus reachability Lemma 5.1.1 (p. 59) and the results on turning a polygon inside-out (Section 5.1.2, p. 63). Many of the generalizations are straightforward, employing nearly identical proofs. Disallowing crossings can lead to fundamentally different situations, however, as we saw with the lack of locked4Dchains and trees (Section 6.4, p. 92).
What remains largely unexplored here are 2D “linkages” in 4D–and higher-dimensional analogs. One model is 2D polygons hinged together at their edges, which have fewer degrees of freedom than 1D linkages in 3D. For example, hinged polygons can be forced to fold like a planar linkage by extruding the linkage orthogonal to the plane (see Figure 26.1). As we have just seen, Biedl et al. (2005) showed that even hinged chains of rectangles do not have connected configuration spaces, with their orthogonal version of the knitting needles (Figure 25.63). It would be interesting to explore these chains of rectangles in 4D. Another connection is to Frederickson's hinged piano dissections (p. 423), which are also just beginning to be explored.
Suppose you take a sheet of paper, fold it flat however you like, and then make one complete straight cut wherever you like. The result is two or more pieces of paper which, when unfolded, form some polygonal shapes. Figure 17.1 shows how to make the simple example of a 5-pointed star. More surprisingly, it is possible to obtain a polygonal silhouette of a swan, angelfish, or butterfly, or to arrange five triangular holes to outline a star (see Figure 17.2). The fold-and-cut problem asks what polygonal shapes are possible, and how they can be arranged.
History. This problem was first posed in 1960 by Martin Gardner in his famous Mathematical Games series in Scientific American (Gardner 1995a). Being attuned to the magic community, Gardner was aware of two magicians who had experimented with fold-and-cut magictricks:HarryHoudini,whose1922bookPaper Magic (Houdini1922) includes one page on how to fold and cut a regular 5-pointed star; and Gerald Loe, whose 1955 book Paper Capers (Loe 1955) is entirely about the variety of (largely symmetric) shapes that Loe could fold and cut. In fact, the fold-and-cut idea goes farther back: a 1721 Japanese puzzle book by Kan Chu Sen (1721) poses and later solves a simple fold-and-cut puzzle; and an 1873 article about the American flag (National standards and emblems 1873) tells the story of Betsy Ross convincing George Washington to use a regular 5-pointed star on the American flag because it was easy to produce by fold and cut.
Result. The surprising outcome to the fold-and-cut problem is a universality result: every plane graph of desired cuts can be made by folding and one cut.
The problem of sharing resources between processes was briefly discussed in Chapter 3. Two requirements were identified as being essential: mutual exclusion and condition synchronisation. This chapter discusses various ways in which these requirements can be met in Ada without having to encapsulate the resource in a server task and without having to use the rendezvous. Ada gives direct support to protected data by the protected object feature, the discussion of which is the main focus of this chapter. However, the language does also support the notions of atomic and volatile data, which are covered in Section 7.13.
Protected objects
A protected object in Ada encapsulates data items and allows access to them only via protected subprograms or protected entries. The language guarantees that these subprograms and entries will be executed in a manner that ensures that the data is updated under mutual exclusion. Consequently, they are rather like monitors found in previous concurrent programming languages (as described in Chapter 3).
A protected unit may be declared as a type or as a single instance; it has a specification and a body.
The development of the Ada programming language forms a unique and, at times, intriguing contribution to the history of computer languages. As all users of Ada must know, the original language design was a result of competition between a number of organisations, each of which attempted to give a complete language definition in response to a series of documented requirements. This gave rise to Ada 83. Following 10 years of use, Ada was subject to a complete overhaul. The resulting language, Ada 95, had a number of significant changes from its predecessor. A further 10 years of use has produced another version of Ada, known as Ada 2005, this time the changes are less pronounced and yet there are some key extra facilities, especially in the areas of real-time programming.
Closely linked to the development of Ada has been this book on its concurrent features. Starting out as ‘Concurrent Programming in Ada’, it became ‘Concurrency in Ada’ when the Ada 95 version of the language was defined. There were two editions of this title. With the new features of Ada 2005, it has been decided to broaden the focus of the book to include real-time issues – hence this first edition of the new title ‘Concurrent and Real-Time Programming in Ada 2005’. No prior knowledge of concurrent programming (in general) or of Ada tasking (in particular) is assumed in this book. However, readers should have a good understanding of at least one high-level sequential programming language and some knowledge of operating system principles.
This book is aimed both at professional software engineers and at students of computer science (and other related disciplines).
The Ada language addresses many aspects of software engineering, but it is beyond the scope of this book to discuss in detail its support for such topics as programming in the large, reuse and so on. Rather, the goal of this book is to discuss, in depth, the Ada model of concurrency and how it is affected by other areas of the language, for example exception handling. This chapter explores the interaction between the object-oriented programming (OOP) facilities and tasking.
Ada 83 was defined long before object-oriented programming became popular, and it is a credit to the Ada 95 language designers that they managed to introduce OOP facilities without having to alter the basic structure of an Ada program. However, the Ada 95 model had several limitations. In particular, it did not support the standard prefix notation (also called the distinguised receiver syntax), Object_Name.Method_Name(Params), found in most OOP languages. Instead, it required the object name to be given as part of the parameter list of the method. Although this had some advantages, it caused some confusion when programmers moved from languages like C++ and Java to Ada. Ada 2005 now allows the standard OOP notation with the object name prefixing the subprogram name when it is called.
Ada 95 also didn't attempt to integrate the language's support for concurrent programming directly into the OOP model. Instead, the models were orthogonal and paradigms had to be created to allow the benefits of OOP to be available in a concurrent environment.
Ada is a high-level programming language; it provides abstract constructs that allow programs to be constructed easily and safely. However, it is recognised that one of the intended application areas for Ada is the production of embedded systems. Often these (and other) systems require the programmer to become more concerned with the implementation, and efficient manipulation, of these abstract program entities. Ada resolves this conflict in two ways:
by allowing the programmer to specify the representation of program abstractions on the underlying hardware, for example by specifying the layout of a record or the address of a variable; and
by having extra facilities in the Systems Programming Annex for interrupt handling, controlling access to shared variables, unique identification of tasks, task attributes and the notification of task termination. As with all Ada annexes, these features need not be supported by all compilers.
The areas that are of concern in this book are those which relate directly to the tasking model. These are:
device driving and interrupt handling – covered in this chapter;
access to shared variables – previously covered in Section 7.12
task identification – motivated in Section 4.4 and covered fully in this chapter;
task attributes – covered in this chapter;
task termination (notification thereof) – covered in Section 15.7.
Other relevant embedded systems issues such as access to intrinsic subprograms, control over storage pools and data streams, and the use of machine code inserts are not dealt with.