# Computational Diversions: The Game of HullGrams

## Authors

- First Online:

DOI: 10.1007/s10758-011-9178-x

- Cite this article as:
- Eisenberg, M. Tech Know Learn (2011) 16: 97. doi:10.1007/s10758-011-9178-x

- 59 Views

This installment of the computational diversions column introduces a new game (at least I think it’s new, and original–I haven’t seen it anywhere before). The game is called *HullGrams*, which is intended to suggest a blend of the classic mathematical pastime of tangrams with the geometric notion of a convex hull.

By way of preface–before we get to the rules of HullGrams–let’s begin with its inspiration in the puzzle of tangrams. Many readers will be familiar with tangrams; but for those who have never seen the puzzle, books such as (Crawford, 2002) and (Read, 1965) are recommended. Martin Gardner, in his *Scientific American* column, discussed the pastime and researched its history (Gardner (1988), chapters 3–4); that history, by the way, is resolutely less romantic than the fable originally spun by the larger-than-life American “puzzle king” Sam Loyd, who did not invent tangrams but popularized it early in the twentieth century. Briefly, the basic idea of the tangram puzzle is that we are provided with a set of seven geometric pieces: five of these are isosceles right triangles (two large, two small, and one medium-sized), one is a square, and one a parallelogram, and all angles within the shapes are multiples of 45 degrees. By placing the seven shapes flat on a plane in different arrangements, we can create an astonishing range of composite shapes.

I could spend much more time on tangrams, but there is already an extensive literature; and my hope is that by now you’ve gotten the idea, even if this is your first encounter with the puzzle. For those who have spent time with tangrams, you will probably have observed that in fact most goal shapes are pretty easy to match. The truly *tough* puzzles are the ones with relatively simple silhouettes, like the square in Fig. 1; but most goal shapes are more challenging in their original composition than they are in their solution. That is, it’s hard to *create* a silhouette for a recognizable tangram bunny, or fox, or sailboat; but it’s not hard to *solve* those puzzles. If you don’t believe me, take a look at some of the compilations of tangram puzzles: you’ll find that the simple outlines correspond to the tough puzzles, while the complex outlines are easy to match.

- (a)
We begin with only four pieces, all of which are squares of equal size. (If you like, for simplicity, you can think of these squares as each having a side-length of 1 unit.)

- (b)
We arrange the four squares on a planar surface (such as a table) so that all the edges are horizontal or vertical, and so that each square meets at least one other along an edge or at a vertex. The squares cannot overlap; that is, all four squares must lie flush on the table.

- (c)
Now we take the convex hull of the combined vertices of the squares.

^{1}This hull is the “outline” that has to match a given goal shape.

Note that Fig. 2 illustrates the construction of a sample HullGrams puzzle. This is the inverse of the sequence by which we would solve a puzzle. Typically, we would begin by showing the undifferentiated silhouette at right (the goal), and the job of the puzzle-solver would be to arrange the four squares so that they fit within the goal outline.

- 1.
Allow for more than four component shapes (e.g., allow for five–rather than four–squares in an extension of HullGrams Lite).

- 2.
Allow for arbitrary rotations of shapes (rather than “standard orientations” as in the HullGrams variations described in this column).

- 3.
Try different component shapes–equilateral triangles, rhombi, pentagons, or circles might make for fun variations.

- 4.
Allow for beginning HullGrams sets with more than one type of shape (e.g., one might begin with the seven pieces of the classic tangrams puzzle).

My own feeling is that solving a HullGrams puzzle–particularly for an advanced variant of the game–is considerably more challenging than solving most tangrams examples. Unlike tangrams, where a complex goal shape practically “gives away” the solution, in HullGrams the silhouette goal shape doesn’t reveal so much internal detail. Of course, the HullGrams goal shapes are not as artistic as those of tangrams (because they’re convex shapes by definition, you can’t make a reasonable “HullGrams bunny” or anything of that sort); but the new pastime makes up in visual challenge to the *solver* what it takes away in artistic challenge to the constructor.

HullGrams might be a good project for a “mixed physical-virtual” computer game. Here’s how an implementation might work: first, we provide a set of physical pieces (of the correct size and shape) for a class of HullGrams puzzles. In the case of HullGrams Lite, for instance, we would provide the solver with four squares made out of cardstock (or even better, perhaps, wood or plastic–like the pieces in my tangrams kit shown in Fig. 1). Next, we have a program that displays silhouettes at the correct scale on a tablet device (such as the iPad). The user’s job is to lay the tablet device down flat so that its surface can act as a sort of “table” on which the physical pieces might then be arranged. Thus, the puzzle solver could visually see when she has solved the puzzle: the appearance of a solved HullGram puzzle will then be something like the middle portions of Figs. 2 and 3, where the physical pieces are placed against the background of the convex hull goal shape. Once a particular puzzle is solved, the user could request another goal silhouette to appear on the tablet display.

Readers are encouraged to suggest their own HullGrams puzzles, or new variants–or, for the ambitious, to try implementing a tablet-device HullGrams program like the one described above. Suggestions and novel ideas along these lines can be sent to this column at: ijcml-diversions@ccl.northwestern.edu.

The *convex hull* of a set of planar points is the minimal convex polygon that contains all the points; if you're of a physical cast of mind, you could think of this as the shape that you would get by stretching a rubber band around the set of points and then allowing the band to "snap closed" on the points, wrapping around them. Algorithms for constructing the hull are a staple of computational geometry texts such as O'Rourke (1998).