You are on page 1of 25

Computer Algorithms for Star Pattern

Construction 4

4.1 Introduction Hankin (1925a), who referred to it as the “polygons-in-


contact technique.”
The primary purpose of this book is to demonstrate the As much as possible, I intend this chapter to be self-
historical development, range, sophistication, and structure contained, so that the exposition will not rely heavily on
of Islamic geometric patterns. Throughout the exposition, it consultation of other texts as background material. In some
has been taken for granted that these patterns could simply cases, this goal had to give way to practicality; for example,
be conjured into existence as computer-based drawings, with the full implementation of a planar map data structure
no hint at the provenance of those drawings. As it happens, (see Sect. 4.2.3) would likely require a longer explanation
the figures in this book have been produced almost entirely than this entire chapter! Naturally, I also assume some mini-
“by hand”; that is, they were created via manual interaction mum level of mathematical sophistication and programming
with drawing software. And indeed, a sufficiently proficient ability. The reader will need an understanding of basic linear
computer user should have no difficulty reproducing most of algebra (vectors and matrices, systems of linear equations,
the drawings in this book by hand using software such as coordinate systems, and so on), as well as the ability to
Adobe® Illustrator®, the freely available Inkscape, or (in Jay implement moderate-sized algorithms in their favorite
Bonner’s case) Rhino3D® and AutoCAD®. programming language.
However, the relationship between computers and I have assumed that the primary goal for a reader of this
Islamic patterns need not end there. Given the level of chapter is to implement a practical software tool, and not to
geometric rigor that appears to underlie the construction of study in complete depth the mathematical ideas that support
these patterns, we might naturally seek to automate some its creation. To that end, I have made an effort to avoid
part of that construction by translating it into software technical jargon, and to omit complex definitions and proofs
algorithms. In any task related to the creation of ornamental when they are not strictly necessary in order to develop
designs, there are obvious benefits to computer automation. software. Of course, my love for the elegance and power of
It becomes fast and painless to explore vast design spaces, geometry will inevitably reveal itself in my writing; I ask the
without the need to execute each design laboriously by hand; reader to indulge me, or better yet to join me in my pursuit of
mistakes can trivially be reversed; it becomes possible to mathematical beauty.
generate designs procedurally that might have been difficult
or impossible to work out by hand; and computer-generated
designs can feed directly into a number of contemporary
4.1.1 Example Construction
computer-controlled manufacturing processes to produce
real-world artifacts.
In order to get a high-level sense of the mathematical and
As a computer scientist, the study of Islamic geometric
computational techniques that will play a role in the con-
patterns has formed one theme of my larger research pro-
struction of star patterns, I begin by walking through a single
gram throughout my entire career. In this closing chapter,
example. The sections that follow in this chapter will then
I will develop the mathematical and computational tools
elaborate on the steps presented here.
needed to construct and render a wide range of patterns.
We begin with a tiling of the plane by regular decagons,
My goal is to present a computational take on the polygonal
regular pentagons, and irregular barrel-shaped hexagons,
technique, the style of pattern construction discussed in the
one that should by now be familiar to readers of this book
rest of the book. This technique was first presented by
(see for example Fig. 200c). The tiling is shown in Fig. 503,

# Craig Kaplan 2017 549


J. Bonner, Islamic Geometric Patterns, DOI 10.1007/978-1-4419-0217-7_4
550 4 Computer Algorithms for Star Pattern Construction

Fig. 503 An example of a tiling


that will be used as an underlying
polygonal tessellation in the
construction of a star pattern

together with isolated copies of each of the three tile shapes.


The hexagon’s shape is easily derived by superimposing two
pentagons, as shown in the figure. Note in particular that α
most tiles are regular polygons, which the reader can guess θ θ
will be the source of the stars in the final pattern. This tiling
will serve as scaffolding for the construction of a star pat- Fig. 504 A depiction of a single edge of an underlying polygonal
tern. I will use the term “template tiling” to refer to such tessellation, with two rays emanating from its midpoint. The rays are
tilings in this chapter, and occasionally also refer to them as elevated at a “contact angle” of θ; equivalently, they are separated by an
“angular opening” of α
“underlying polygonal tessellations,” as in the rest of the
book.
I have conjured this tiling from thin air, as it were, other edges. Here, the contact angle represents the elevation
without offering any hint of its provenance. I am also taking of each ray with respect to the tile edge, as shown in
for granted the fact that the tiling “exists” in a mathematical Fig. 504. The earlier chapters of this book instead measure
sense. Existence in this context means two things: first, that the angle formed by the rays themselves, labeled α in
these shapes really do fit together seamlessly, without subtle Fig. 504. These two measurements are related through the
gaps, overlaps, or deformations; and second, that the small simple equation 2θ + α ¼ 180 .1
excerpt shown can, in principle, be extended to cover the This construction of the rays is illustrated for the pentagon
entire plane in an obvious way. For now, we can accept this in Fig. 505. In this case, the combination of the tile shape and
tiling as given, and indeed could simply choose to rely on the the contact angle of 72 produces a pentacle as the motif.
vast library of tilings known to be useful for Islamic design, A similar process yields a motif for the decagon in
as demonstrated in this book. Later, I will discuss techniques Fig. 506. Because of the size of the tile, we use a variation
for constructing tilings from scratch. of the technique applied to the pentagons. We intersect rays
To construct a star pattern, we develop a motif for each coming not from adjacent decagon edges, but from every
unique tile shape, and copy the motifs to any desired second edge. Equivalently, we allow rays to travel until their
arrangement of those tiles. The motifs must be developed second intersections, rather than their first. This variation
so that they link together to form a seamless design. produces a ring of kite shapes as an extra layer of geometry
Following the methods introduced in this book, we
choose a “contact angle” θ, and invent motifs based on 1
All angles in this chapter are given in degrees. However, many
rays that form the angle θ with the midpoints of tile edges.
programming languages and libraries expect angles to be given in
The geometric process will involve truncating those rays radians. We can convert between units by noting that 360 ¼ 2π
into line segments where they meet rays coming from radians.
4.2 Basic Building Blocks 551

Fig. 505 The development of a motif for a pentagonal tile, with a intersect other rays (centre). The remaining line segments define the
contact angle of θ ¼ 72 . Rays are constructed emanating from every motif, in this case a pentacle (right)
edge midpoint with this angle (left). They are cut off where they

Fig. 507 The development of a motif for the barrel-shaped hexagonal


tile. Because the tile is not a regular polygon, we determine all
Fig. 506 The development of a motif for a decagonal tile. The rays are intersections separately
permitted to continue to their second intersections, producing an outer
layer of kite shapes surrounding a central star
panel cut from Corian® (a synthetic marble-like material)
using laser cutting.
around a central ten-pointed star. Without this extra layer, the To summarize, the major steps in the construction process
motifs inside large regular polygons can appear too sparse. are the specification of the template tiling, construction of
The situation for the barrel-shaped hexagon is not quite as motifs for the individual tile shapes, and decoration of the
simple. For tiles that are regular polygons, the intersection resulting design. I will discuss each of these steps in the
points must necessarily be arranged in a symmetric ring following sections. I will finish the chapter with a brief
around the center of the polygon. Thus, once a single inter- overview of some new aesthetic possibilities that are made
section is computed, all others can be constructed via available by applying modern mathematical and computa-
rotations. With more general polygons, we may have to tional ideas to the construction of star patterns.
determine each intersection point independently. In this
case, we can still intersect each ray with the opposing ray
from an adjacent edge to produce the motif shown in 4.2 Basic Building Blocks
Fig. 507. But note that we must be prepared for special
cases, such as a point where two intersections coincide, as It is helpful to begin by reviewing the basic mathematical
in the four rays that meet in the center of this hexagon. and computational concepts that make up a toolkit for
As mentioned previously, we can assemble the star computer-based geometric art. In this section I give a general
pattern by transferring the motifs from the three decorated overview of the mathematics, algorithms, and data structures
tile shapes to the instances of those tiles in some final that are likely to be found in any two-dimensional design
arrangement. The result will resemble the drawing in project based on polygons. Readers with experience in com-
Fig. 508. Of course, while this design already has a natural puter graphics and geometry will likely be able to skim this
geometric elegance, it is more a mathematical schematic section or skip it altogether.
than a finished artwork. Part of the beauty of Islamic geo-
metric design comes from the decorative treatments applied
to the strands of the design and to the regions they enclose. 4.2.1 Points, Lines, and Polygons
Two typical examples, including the very important inter-
laced style, are shown in Fig. 509. The generated geometry Every point in the plane can be described via a pair of real-
can even be used as input for computer-aided valued coordinates; for example, we might define a point
manufacturing; Fig. 510 shows an example of a real-world P ¼ (x,y). If P ¼ (x1,y1) and Q ¼ (x2,y2) are distinct points,
552 4 Computer Algorithms for Star Pattern Construction

Fig. 508 A star pattern


assembled from decorated tiles

Fig. 509 Two examples of


decorative treatments applied to
star patterns: interlaced strands
(left) and filled regions (right)

then they define a unique line l in the plane. This line can be between 0 and 1 (inclusive), the function l(t) traces out the
described in parametric form via the function l(t) ¼ P + t line segment that joins P and Q. A comparison between a
(Q  P) ¼ (x1 + t(x2  x1),y1 + t(y2  y1)). Every distinct real line, a ray, and a segment is shown in Fig. 511. Lines, rays,
value of t produces a distinct point on the line. If we restrict and segments can all be represented in software via pairs of
ourselves to nonnegative values of t we obtain the definition points; the interpretation of those points might therefore
!
of a ray emanating from P, sometimes denoted PQ, depend on the context.
consisting here of all those points R on the line such that Let A, B, C, and D be points with A 6¼ B and C 6¼ D. Let
P does not fall between Q and R. If we further restrict t to lie A have coordinates (xA,yA), and assume that the other points
4.2 Basic Building Blocks 553

segment, finishing by connecting Pn back to P1. If the


resulting path never intersects itself, then the Pi collectively
define a polygon, which we take to comprise the path
together with the region of the plane that it encloses. (This
definition ignores more complex objects such as self-
intersecting polygons or polygons with internal holes,
which are not useful for our purposes.)
One important class of polygons consists of the regular
polygons, in which all edge lengths and internal angles are
identical. We can imagine tracing the outline of a regular
n-gon by repeatedly taking a single step forward and turning
left by 360n degrees. The polygon’s internal angles must
therefore all be 180  360 n ¼ 180 n . Alternatively, some
n2

simple trigonometry allows us to inscribe a regular n-gon


 
in a circle of radius r by setting Pi ¼ r cos 360in ; r sin n .
360i

Fig. 510 An example of a star pattern executed in Corian® via laser One might therefore represent a regular n-gon of radius 1 in
cutting software via the integer n alone, and construct the points
later if they are needed.

4.2.2 Transformations

The essence of most mathematical patterns, and of software


for drawing them, is the ability to apply a set of
transformations to a basic motif. Apart from the extensions
Fig. 511 Examples of a line containing points P and Q (left), a ray to be discussed at the end of this chapter, we will make use of
emanating from P in the direction of Q (center), and a line segment
joining points P and Q
a set of transformations of the plane known as the
similarities. In the plane, similarities are transformations
that affect the position, orientation, and size of an object
without changing its underlying shape.
are defined analogously. These four points define two lines
Every similarity in the plane can be encoded in a 3  3
with parametric equations lAB(t) ¼ A + t(B  A) and
matrix for which the bottom row is fixed as (0,0,1). To
lCD(s) ¼ C + s(D  C). Assuming that the two lines are
transform a given point P ¼ (x,y) by a similarity T in matrix
not parallel, they must intersect at some unique point P.
form, we temporarily augment P with an additional coordi-
P can be found by setting lAB(t) ¼ lCD(s), which after some
nate,2 set to 1:
rearrangement can be expressed as the following system of
linear equations: 0 10 1
a b c x
     T ðPÞ ¼ @ d e f A@ y A ¼ ðax þ by þ c; dx þ ey þ f Þ
xB  xA xC  xD t xC  xA
¼ 0 0 1 1
yB  yA yC  yD s yC  yA
In software we do not need to represent the bottom row of
The intersection can therefore be found by solving the
the matrix or the extra coordinate attached to points, but it is
system to obtain t and s, and computing P ¼ lAB(t)
helpful to include them when presenting the mathematical
(or P ¼ lCD(s)). This process can further be refined to
ideas.
intersect any combination of lines, rays, or segments by
We can immediately single out a few simple similarities,
rejecting intersections that fall outside the implied legal
together with their matrix representations:
ranges on t and s. When intersecting two rays, for example,
if either of the computed values of t and s is negative then we
simply decree that the rays do not intersect.
Let P1, . . ., Pn be a sequence of n points in the plane, with
Pi ¼ (xi,yi). (In software, this sequence might be represented
2
using a sequence type such as a list or an array.) We con- The geometric meaning of this extra “homogeneous coordinate” can
be made mathematically rigorous, but the details are not needed in this
struct a closed path by connecting each Pi to Pi+1 with a line chapter.
554 4 Computer Algorithms for Star Pattern Construction

Name Description Matrix edges, and each edge is a line segment that terminates in
0 1 two vertices. Such geometric configurations are known by
Translation Displace every point by a 1 0 tx
vector v ¼ (tx,ty); that is, @0 1 ty A various names; I will refer to them as planar maps.
move every point (x,y) to a 0 0 1 The key to an effective planar map implementation is to
point (x + tx,y + ty)
0 1 ensure that every vertex, edge, and face have direct, efficient
Rotation Rotate every point cos θ  sin θ 0 access to the other geometrical primitives to which they are
counterclockwise around the @ sin θ cos θ 0A
origin by an angle θ 0 0 1
adjacent. There are a few ways to build a data structure that
0 1 supports this efficiency. The most robust is the doubly
Horizontal Reflect in the x-axis: 1 0 0
reflection transform every point (x,y) @ 0 1 0A
connected edge list (DCEL), a complex, pointer-based data
into (x,y) 0 0 1 structure (de Berg et al., 2008). A complete DCEL imple-
0 1 mentation can be quite challenging to create. It might be
Uniform Grow or shrink the entire α 0 0
scaling plane by a factor α: transform @0 α 0A more practical to trade in some of the efficiency for a simpler
every point (x,y) into (ax,ay) 0 0 1 implementation. It may also be possible to build upon a
preexisting library, such as 2D Arrangements in CGAL
It suffices to articulate the matrices above, in the sense (www.cgal.org), or the Java Topology Suite (www.
that any planar similarity may be expressed as a composition vividsolutions.com/jts).
of similarities of these four types, and therefore computed as
the product of the corresponding matrices. Note also that
these 3  3 matrices can encode a broader class of 4.3 Tilings
transformations than similarities (a class known as the
“affine transformations”); but by working only with known It should be clear by observation that a significant amount of
similarities together with their products and inverses, it is mathematical structure underlies the polygonal tessellations
easy to avoid producing a more general matrix by accident. used throughout this book. While some of that structure can
The class of similarities that do not change sizes (i.e., that be appreciated and applied intuitively (possibly with the aid
do not incorporate any nontrivial uniform scaling operations) of basic constructions by compass and straightedge), we can
are known as the rigid motions. The rigid motions can be benefit from a more rigorous theory in the development of
thought of as those transformations that precisely preserve computational methods for star patterns. The field of mathe-
the shapes and sizes of objects in the plane. We can therefore matics known as tiling theory offers many important tools
use rigid motions to define congruence: we say that two for exploring the range of tilings that might be used produc-
shapes are congruent if there exists a rigid motion that brings tively in Islamic design. The closely related field of symme-
the first into exact coincidence with the second. Congruence try theory will help us specify algorithms and data structures
is the most appropriate mathematical analogue for the infor- for representing simple tilings. In this section I present just
mal notion of two shapes being “the same.” enough tiling theory, focusing on tilings by polygons, to
support the algorithms to follow. I also discuss a few
families of especially relevant tilings.
4.2.3 Planar Maps Tiling theory is a beautiful, rich area of mathematics, full
of both unsolved problems and aesthetic opportunities. It is
If our goal in constructing a drawing is to decompose the likely to appeal to anyone with a passion for Islamic geo-
canvas into independent polygonal regions that never inter- metric design. Interested readers are encouraged to seek out
act with one another, it might suffice to represent those Grünbaum and Shephard’s seminal work on tiling theory
regions via a list of polygons. However, we will encounter (Grünbaum and Shephard 2016), or my introductory book
situations where the relationships between those regions are on tiling theory for computer graphics (Kaplan, 2009a).
important as well. For example, we may want to know which
other polygons share an edge with some given polygon, or
which polygons contain edges that start or end at a given 4.3.1 Patches and Tilings
point. When constructing motifs in Sect. 4.4, we will need to
compute the intersections of rays, and divide the plane into In full generality, tilings can exhibit many abstruse mathe-
regions based on those intersections. In general, software matical behaviors that are not relevant in the context of
that operates based on these geometrical relationships will Islamic geometric design. In this section, I develop a
benefit from a data structure that encodes them explicitly. simplified theory containing only those facts about tilings
Generally, we are interested in representing that are necessary for our purposes. (In the language of
decompositions of the plane into nonoverlapping faces, Grünbaum and Shephard (2016), these would be normal,
where each face is a polygon bounded by a sequence of k-hedral tilings by polygons.)
4.3 Tilings 555

Let T ¼ fP 1 ; P 2 ; . . .g be an infinite collection of 4.3.2 Periodic Tilings


polygons. We say that T is a tiling of the plane if the
polygons in T cover the entire plane, leaving no gaps (points The simple definition of a tiling given above permits tilings
that are not covered by any polygon) or overlaps (points that with no bound on the complexity of the shapes of the tiles or
are in the interior of more than one polygon). their arrangement. In this section I introduce the mathemati-
One immediate consequence of this definition is that a cal and algorithmic machinery of periodic tilings, which
tiling must necessarily be a mathematical abstraction. The greatly limits both of these forms of complexity. Periodic
fact that a given set of polygons is a tiling of the plane will tilings, and the broader class of periodic designs to which
always be established through high-level reasoning, rather they belong, play a significant role in ornamental design
than by enumerating an infinity of individual tiles. This traditions around the world (Washburn and Crowe 1992).
implicit point of view informs the computational approach Symmetry theory is the standard mathematical tool for
to tilings: we regard a program for tiling not as a machine characterizing repetition in patterns. A complete discussion
that churns out an infinite list of tiles, but as a procedural rule of symmetry theory and its relationship to tiling theory
that, when “challenged” with any finite region of the plane, would take us too far afield; interested readers should consult
responds with just enough tiles to cover that region Grünbaum and Shephard (2016), the gentler introduction by
completely. To this end, we define a patch to be a finite Farmer (1996), or the more recent topology-based treatise by
collection of nonoverlapping polygons, whose union is a Conway, Burgiel, and Goodman-Strauss (2008).
single connected region of the plane with no internal holes A rigid motion in the plane is a symmetry of a given tiling
(see Fig. 512). In light of that definition, a tiling might be if the transformed tiling lines up precisely with the original,
viewed computationally as a function that consumes regions in the sense that every transformed tile lies directly atop
and produces patches. some untransformed tile (possibly itself). Note that the iden-
When two polygonal tiles are adjacent in a patch or tiling, tity transformation, which leaves every point in the plane
it is possible for a vertex of one polygon to lie somewhere where it is, is a symmetry of every tiling according to this
along an edge of the other polygon. We refer to such an definition; thus every tiling has some nonempty set of
arrangement as a T-junction. A patch or tiling will be called symmetries. A tiling is periodic if its symmetries include
corner-to-corner if it contains no T-junctions (see Fig. 513). translations in two nonparallel directions. These translations
When constructing motifs with the polygonal technique (see will necessarily form a two-dimensional family through
Sect. 4.4), we will need to watch out for tilings that are not which the tiling will repeat across the entire plane. For this
corner-to-corner. reason, periodic patterns are also sometimes called wallpa-
per patterns or all-over patterns.

Fig. 512 An example of a patch


of tiles (left), constructed from the
tile shapes used in Sect. 4.1.1.
The collection of tiles on the right
does not constitute a patch,
because the tiles are in two
disconnected pieces, and one
piece has an internal hole

Fig. 513 A demonstration of


T-junctions in polygonal tilings.
Both tilings use copies of the
same L-shaped triomino. The
tiling on the left contains many
T-junctions, one of which is
circled. The tiling on the right has
no T-junctions, and is therefore
corner-to-corner
556 4 Computer Algorithms for Star Pattern Construction

Fig. 514 The structure of


periodic tilings. The diagram on
the left shows the tiling of Sect. v2 0v1+ 1v2
4.1.1, with a single translational
unit outlined in bold and
translational symmetry vectors v1
-1v1+ 1v2 1v1+ 0v2
and v2 superimposed. On the v1
right, the tiling is reconstructed
from copies of the translational
unit, translated by integer linear 0v1+ 0v2
combinations of v1 and v2

-1v1+ 0v2 1v1+ -1v2

Periodicity implies a significant amount of redundancy in v1 + (b + 1)v2} for some integers a and b. These period
a tiling, a fact that can readily be exploited in creating paralellograms correspond one to one with copies of the
software for manipulating periodic tilings. In particular, we translational unit. Let us temporarily consider the special
can “factor out” all the redundancy, reducing the structure of case in which the translational units are precisely these
a periodic tiling down to the following pieces of parallelograms. We must determine which such
information: parallelograms overlap a given region R.
The solution becomes more obvious if we consider the
• A finite patch of tiles, called a translational unit (or a geometry of the situation in a coordinate system where the
“repeat unit” in previous chapters) coordinate vectors are v1 and v2, as shown in Fig. 515. This
• Two vectors v1 ¼ (x1, y1) and v2 ¼ (x2, y2) change of coordinates can be carried out explicitly via a
matrix equation; the new representation (x0 ,y0 ) of a point (x,
An example of this decomposition is shown in Fig. 514. y) in standard Cartesian coordinates is given by
The idea is that the entire tiling can be recovered by 0 1 0 11 0 1
assembling transformed copies of the translational unit, x0 x1 x2 0 x
translated by vectors av1 + bv2 ¼ (ax1 + by1, ax2 + by2) for @ y0 A ¼ @ y1 y2 0A @yA
all integers a and b. For this construction to work seamlessly, 1 0 0 1 1
the translational unit must be chosen carefully. It must be
nonredundant, in the sense that no tile in the patch can be a In this new coordinate system, the period parallelograms are
copy of another tile translated by v1 or v2. It must also be mapped to unit squares and the region R is mapped to a
maximal, in the sense that enough tiles are included in the distorted shape R0 . The period parallelograms that intersect
translational unit to guarantee that the construction will R are precisely the unit squares that intersect R0 . But the
leave no holes in the plane. (It is not strictly necessary for problem of determining which unit squares intersect a shape
the translational unit to be contiguous, as is implied by is analogous to the problem of representing that shape on a
declaring it to be a patch; but it is usually more convenient raster display by turning on the correct pixels. There are
to choose it as such.) A periodic tiling will typically have many standard scan conversion algorithms that can be
many possible translational units, any of which will suffice applied here to “fill” R0 (Hughes et al., 2013), and the
for the replication process. pixel coordinates these algorithms report will correspond to
As was mentioned in Sect. 4.3.1, our computational goal the integer pairs ai,bi required above.
will be to fill a finite region with tiles, not the whole plane. This mapping is not perfect—in general, the translational
Fortunately, the information above can be used to elaborate a unit will only overlap the period parallelogram without
periodic tiling efficiently over any region R of the plane. We filling it exactly; see Fig. 515f. With a bit more work, one
reduce this problem to that of finding a minimal set of can calculate how much “padding” is needed (in the form of
integer pairs ai,bi so that the copies of the translational extra integer pairs) to ensure that a given region R is covered
unit displaced by aiv1 + biv2 are sufficient to cover R in its entirety.
completely. Frequently, a translational unit will contain additional
Note that these vectors can be seen as partitioning the redundancies that are not accounted for by the translation
plane into an infinite grid of parallelograms; each has verti- symmetries. For example, any translational unit for the tiling
ces at {av1 + bv2,(a + 1)v1 + bv2,(a + 1)v1 + (b + 1)v2, of Fig. 514 will contain multiple regular pentagons, which
4.3 Tilings 557

(a) (b) (c)

(d) (e ) (f)

Fig. 515 A visualization of region filling for periodic tilings, based on Standard scan conversion produces the squares in (d) that overlap R0 .
change of coordinate systems. A region R is shown in (a), surrounding These squares correspond to the needed parallelograms in (e), which
a single translational unit; the associated period parallelogram is guide the placement of translational units in (f). Three units are drawn
superimposed on the unit. In (b), the region is embedded in a with dashed outlines in (f). These are not accounted for by the process,
(conceptually) infinite tiling by copies of the period parallelogram. indicating that the algorithm should conservatively “pad” its answer to
This tiling is transformed via a change of basis into a tiling by unit guarantee that R is completely covered
squares in (c); the same transformation produces a distorted region R0 .

we will almost certainly wish to treat as identical. Further- 4.3.3 Regular and Archimedean Tilings
more, as indicated in Sect. 4.2.1, special-case tile shapes
such as regular polygons are more easily defined in their The simplest tilings of the plane are corner-to-corner tilings
own “native” coordinates rather than the coordinates by congruent regular polygons, known as regular tilings. It
describing their positions in a translational unit. In practice, is easy to see that in the Euclidean plane there are only three
then, we add a layer of indirection to the representation of a possible regular tilings, constructed from equilateral
translational unit, storing the following information: triangles, squares, and regular hexagons, as shown in
Fig. 516. We name each of these tilings using a “word,”
• An array of k distinct prototiles, each defined in whatever consisting of a period-delimited list of the sizes of the
local coordinate system is most convenient. polygons encountered around each vertex of the tiling, lead-
• An array of placed prototiles: Each placed prototile is a ing to the names (3.3.3.3.3.3), (4.4.4.4), and (6.6.6), respec-
pair consisting of an index into the array of prototiles, tively. As in previous chapters we use exponentiation for
together with a 3  3 transformation matrix representing brevity, turning these names into (36), (44), and (63). These
the similarity that transforms the prototile shape to its tilings appear throughout the world’s decorative traditions,
position in the translational unit. both explicitly and as a basis for more complex design. They
will be useful in Islamic geometric design both as underlying
In this way, whatever procedure we develop for filling tile polygonal tessellations and as a starting point for
shapes with motifs, we will need to apply this procedure only constructing other tilings to serve in that role.
once for each unique tile shape. The resulting motifs can be Let us loosen the constraints above, and consider tilings in
placed in the final pattern using the stored transformation which every vertex can be described by a word a1.a2 . . . an,
matrices. where each ai is an integer greater than 2. This generalization
558 4 Computer Algorithms for Star Pattern Construction

Fig. 516 The three regular


tilings of the plane

(36) (44) (63)

Fig. 517 The eight non-regular


Archimedean tilings

(34 .6) ( 33 .42 ) ( 32 .4.3.4) ( 3.4.6.4)

(3.6.3.6) ( 3.122 ) ( 4.6.12) ( 4.8.8)

introduces eight additional words that can be used at every on identifying points in the plane where regular polygons
vertex of a tiling. Canonical tilings exhibiting those words are can be placed, and scaling those polygons so that they link
shown in Fig. 517. These eight, together with the three regular together to define a tiling.
tilings, are known collectively as the semi-regular or Consider the regular tiling (63), as shown in Fig. 516. The
Archimedean tilings; within the context of Islamic geometric center of every hexagon in this tiling is the focal point of a
design, they are directly associated with the system of regular collection of symmetries of the tiling. We can rotate the
polygons detailed previously in this book. Many other tilings tiling around this point by any multiple of 60 and bring it
can be constructed in which every tile is a regular polygon; for into coincidence with itself. We can also reflect the tiling
example, the regular and Archimedean tilings can be seen as across six distinct lines through this point, which pass
the first step in the enumeration of k-uniform tilings for all through either the corners or the edge midpoints of the
integers k > 0, as discussed in Grünbaum and Shephard surrounding hexagon. Generally, we refer to any point that
(2016), Sect. 2.2. acts as the center of a 360/n degree rotational symmetry as
an n-fold axis.
The hexagon is only one member of an infinite family of
4.3.4 Axis-Based Construction of Tilings regular polygons that are compatible with all of these
symmetries, in the sense that any member of this family
In this section I introduce a technique that can produce a can be positioned to map to itself under the given rotations
large family of tilings of particular relevance to Islamic and reflections. If m is any positive integer, then a regular
design, because they are guaranteed to contain many regular 6m-gon placed concentrically with the hexagon will share its
polygons. Full details on this technique, including its appli- rotations. Moreover, if we distinguish one ray leaving the
cation in non-Euclidean geometry, can be found in an earlier hexagon’s center along a line of reflection, then there are two
article (Kaplan and Salesin, 2004). The technique is based distinct orientations for the 6m-gon that are compatible with
4.3 Tilings 559

With these labels in place, let mA, mB, and mC be the


integer multipliers for the regular polygons at A, B, and C,
and let oA, oB, and oC be the choices of orientation. I use the
letters e and v to denote edge and vertex (i.e., corner)
orientation; for example, if oA is e, then the polygon at
!
A should intersect the ray AB at an edge midpoint. The
complete arrangement can then be summarized using the
(a) m = 1, midpoint on ray (1e) (b) m = 1, corner on ray (1v) notation [(63);mAoA,mBoB,mCoC]. The initial (63) indicates
that the construction is based on the regular hexagonal tiling.
Any of the multipliers can be zero, indicating that no poly-
gon should be placed on that axis, in which case the orienta-
tion can be omitted.
This notation does not quite define a tiling, because it fails
to provide (up to) three additional numbers: the sizes of the
polygons. Because the ultimate goal is to produce a tiling of
the plane, it is likely that we will want to scale the polygons
(a) m = 2, midpoint on ray (2e) (b) m = 2, corner on ray (2v)
until they come into contact with each other. With that in mind,
we scale the polygons according to a portfolio of options:

1. If only one of the multipliers is nonzero, we scale the


single polygon until it comes into contact with the oppo-
site edge of the triangle. For example, in [(63);2e,0,0], we
would scale the 12-gon at A until it touches edge BC.
2. If two of the multipliers are nonzero, we scale the two
(a) m = 3, midpoint on ray (3e) (b) m = 3, corner on ray (3v) polygons until they come into contact with each other. In
general, this point of contact can take place anywhere
Fig. 518 The first six ways to place a regular 6m-gon around a sixfold
axis. The dotted and dashed lines indicate lines of reflection of a
along the flag edge between the two polygons. Usually we
hexagon. One of the 12 rays emanating from their intersection point add the constraint that the two polygons should have the
is distinguished for the purposes of indicating orientation, and marked same edge length, in which case there will be unique radii
here with an arrowhead that bring them into contact.
In the context of Islamic geometric patterns, we would
like these two polygons to meet with two corners or two
the lines of reflection: the ray can pass through either a edge midpoints on the flag edge. While we can contrive
corner or an edge midpoint. We can therefore represent the with this notation to have a corner of one polygon scale to
choice of polygon to place in this hexagon with two values: meet the edge of another, the resulting tilings will not
an integer multiplier m, and a Boolean indicating whether to generally be compatible with the star pattern construction
place a corner or an edge midpoint on the distinguished ray. method to be described later.
The first six combinations of m and orientation are 3. If all three multipliers are nonzero, we choose one of the
visualized in Fig. 518. two possibilities. The most direct is based on the previous
In addition to the sixfold axes at hexagon centers, two case: we pick two of the polygons and scale them until they
other families of rotational symmetries lurk in this tiling: meet and have identical edge lengths, and then scale the
threefold axes at hexagon corners, and twofold axes at edge third until it touches the nearer of the other two. Or we can
midpoints. As above, we can choose multipliers and scale all three polygons simultaneously until they form a
orientations for regular polygons to be centered on these axes. three-way contact. This approach requires solving three
We can visualize this set of choices by constructing a equations (which express the fact that the polygons touch)
30–60–90 triangle from a hexagon center, the midpoint of an with three unknowns (the sizes of the polygons), suggesting
edge of that hexagon, and a vertex of that edge; we call such that there will be a unique solution. Of course, we cannot
a triangle a flag. For convenience, we label the 30 , 90 , and also guarantee in this case that the three polygons will have
60 corners A, B, and C, respectively. The polygons identical edge lengths. We might therefore produce a
described above will be centered at A, B, and C, and we non-corner-to-corner tiling (as in Fig. 519c), a fact that
! ! !
can use the rays AB, BC, and CA as a basis for their we will need to take into account later.
orientations.
560 4 Computer Algorithms for Star Pattern Construction

Fig. 519 Three examples of the


axis-based construction of tilings.
Each tiling is shown with the
notation described in Sect. 4.3.4.
From left to right, the diagram
shows a flag with its vertices
labeled, a flag in which regular
polygons have been placed
according to the notation, a scaled
(a) [(63 ); 2e, 2e, 2e]
copy of each regular polygon and
the irregular polygons created to
fill the spaces between them, and
the final tiling. A single
translational unit is outlined in
bold. The bottom example
produces irregular polygons with
T-junctions, one of which is
circled in the inset close-up

(b) [(63 ); 2e, 0, 3e]

(c) [(44 ); 3e, 3v, 2v]

We can now begin to assemble a translational unit, as and some of the numeric constants above must be adapted to
described in Sect. 4.3.2, from translated, rotated, and scaled this configuration. We could also begin with the regular
copies of these regular polygons. The translational unit will tiling (36), but this case need not be considered explicitly
contain a single copy of the A polygon if mA 6¼ 0, three because it has the same axes (and hence yields the same
copies of the B polygon if mB 6¼ 0, and two copies of the tilings) as (63).
C polygon if mC 6¼ 0. Figure 519 illustrates the preceding process in the con-
Except for a small number of fortuitous cases, the regular struction of three different tilings. This notation is rich
polygons will not completely cover the flag, implying that enough to encompass the three regular tilings, and five of
the tiles described so far will leave gaps in the plane. We the Archimedean tilings, as follows:
must therefore introduce additional irregular tiles to fill these
(36) [(63);0,0,1v] (44) [(44);1e,0,0]
holes. The construction given above guarantees that all holes
(63) [(63);1e,0,0] (3.4.6.4) [(63);1e,2e,1v]
will be congruent copies of a single tile. Depending upon the
(3.6.3.6) [(63);1v,0,1e] (3.122) [(63);2e,0,1e]
particular disposition of the regular polygons, the hole filler (4.6.12) [(63);2e,2e,2e] (4.8.8) [(44);2e,2e,2e]
may span more than one flag, and the translational unit may
require 1, 2, 3, 6, or 12 copies of it. The hole is most easily Other tilings used as underlying polygonal tessellations
found by first subtracting the regular polygons from the flag can also be interpreted as arising from related constructions.
triangle (a standard operation in constructive planar geome- Consider, for example, the tiling shown on the right in
try), and then possibly merging multiple copies of the Fig. 520, made up of decagons and bowtie-shaped hexagons.
resulting shape into a single larger tile. The centers of the decagons define a lattice of rhombs with
The preceding construction was presented in terms of the angles of 72 and 108 . Can one-quarter of such a rhomb,
regular tiling (63), but it applies almost unchanged to (44), namely a 36–54–90 triangle, function as a flag? Note that
the regular tiling by squares. The difference is that this tiling 36 and 54 are both multiples of 18, and 18 is the angle
has two families of fourfold axes instead of sixfold and between adjacent lines of reflection passing through the center
threefold axes. The flag is therefore a 45–45–90 triangle, of a decagon. In other words, we can place regular 10m-gons
4.4 Motifs 561

Fig. 520 A tiling construction


inspired by the axis-based
method, applied to a tiling by
rhombs with interior angles of 72
and 108

Fig. 521 The construction of the two rays Li and Ri used to develop motifs within tiles. On the left, point Pi+1 is rotated by angle θ around
midpoint Mi to define the ray Ri emanating from Mi. Its counterpart Li is constructed similarly; the two rays are shown on the right

around the 36 and 54 angles of this “flag” and proceed In a computational setting, it is easy to choose any con-
roughly as before. This tiling is closely related to the opening tinuous contact angle between 0 and 90 . But as the earlier
example in Fig. 503; the connection will be made clear in chapters of this book reveal, the design tradition favors a
Sect. 4.4.4. In Sect. 4.6.3, we will see that this flag-based small set of contact angles based on the geometry of the
construction can be greatly expanded by considering the underlying polygonal tessellation. For example, in the con-
generalization of regular tilings to non-Euclidean geometry. text of the fivefold system described in Chap. 3, the contact
angles for the acute, median, and obtuse families would be
72 , 54 , and 36 , respectively.
4.4 Motifs The key to constructing motifs is to make precise the
manner in which these rays encounter rays emanating from
Let us assume that we have used the techniques of the other edges, and are truncated into line segments at those
previous section to obtain a periodic tiling of the plane meeting points.
based on a small set of regular and irregular polygons. The Because regular polygons are so simple, I begin by exam-
next step is to produce a line-based motif for each unique tile ining them as a special case. I then proceed to develop a
shape. (We assume for now that we are interested only in the general algorithm that can produce motifs for a wide range
“raw geometry” of the design; the next section will discuss of polygonal tiles.
the decoration of Islamic geometric patterns in greater
detail.) Once these motifs are constructed, they can be
transformed into their final positions to produce a design. 4.4.1 Regular Polygons
As outlined in Sect. 4.1.1, the general approach is to
choose a contact angle θ between 0 and 90 , and to con- Let us assume that we are trying to construct a motif for a
struct two rays at the midpoint of each of a tile’s edges. An regular n-sided polygon P1, . . ., Pn. We can further assume
edge’s rays point towards the interior of the tile, forming two that the polygon’s corners lie on a unit circle, as in Sect.
angles of size θ with the edge. If the corners of the polygonal 4.2.1. A basic motif can always be formed by finding the
tile are labeled P1, . . ., Pn, then we might denote the two rays intersection, for every i, of rays Ri and Li+1 (with indices
originating at the midpoint Mi of PiPi+1 by Li and Ri; the “left taken circularly, so that we intersect Rn and L1). With a bit of
ray” Li is the one that points to the left of the edge’s perpen- trigonometry, we can derive an analytical expression for the
dicular bisector, and the “right ray” Ri points to the right. locations of these intersections, but in a software implemen-
These rays can easily be constructed in software, as shown in tation it is easier to write a short function that computes the
Fig. 521. For example, the origin of Ri is Mi; the point intersection numerically. The rays can be constructed as
defining the direction of the ray can be computed by above, and intersected in the manner discussed in Sect.
transforming Pi+1 by a rotation about this midpoint by 4.2.1. We can further simplify this process by computing a
angle θ. single intersection this way, and deriving the other n  1 by
562 4 Computer Algorithms for Star Pattern Construction

rotating it around the origin by multiples of 360/n degrees. If the bowtie extend rays to opposite edges rather than their
we denote by Ci the intersection of Ri and Li+1, then the motif neighbors.
will consist of all line segments of the form RiCi and CiLi+1. The aesthetic of the “correct” solution seems to be
This process will fill a regular n-gon with an n-pointed derived from a kind of “economy of line,” a desire to use
star. However, when n is large and θ is small, the star will fill as little ink as possible while still linking all rays. With that
the polygon sparsely, producing a design that typically does in mind, we proceed with the heuristic that we should seek to
not have enough visual detail. Traditionally, this deficiency join rays so as to minimize the total length of the lines that
is mitigated by propagating the rays by one extra step, make up the resulting motif.
cutting them off at their second intersections rather than Let us assume that we are given an n-sided polygon, with
their first. This change is equivalent to intersecting Ri with rays L1,R1, . . ., Ln,Rn constructed as above. We wish to find,
Li+2 for all i. An easy heuristic is to add this extra layer of for every left ray Li, a corresponding right ray Rj, from which
geometry whenever n  6. we compute the intersection Cij of the two rays and insert the
two segments LiCij and CijRj into the motif. This correspon-
dence can be expressed via the pair (i,j). A complete motif
4.4.2 Other Polygons can then be found by enumerating a sequence of
correspondences of the form (1,j1), . . ., (n,jn) (where the
When a polygonal tile is not regular, we can no longer rely sequence j1, . . ., jn is a permutation of the numbers from
on the simple expedient of intersecting adjacent left and 1 to n) so that the total length of the line segments thereby
right rays. Consider, for example, the bowtie-shaped hexa- produced is minimized.
gon mentioned at the end of Sect. 4.3.4, with a contact angle We might consider simply generating all permutations of
of 54 . Naively joining adjacent rays produces the ungainly the numbers from 1 to n and testing the sizes of the
motif shown on the left in Fig. 522. As seen previously in associated motifs, but this approach quickly becomes ineffi-
Fig. 187, the correct motif for this tile and contact angle is a cient as n grows. In practice, a greedy approximation
pair of kite-shaped quadrilaterals, in which the long edges of produces acceptable motifs far more efficiently. First, gener-
ate every possible ray correspondence (i,j) and assign that
correspondence a weight wij equal to the sum of the lengths
of the two line segments implied by that correspondence. If
the rays do not intersect, set wij to infinity; if they point
directly at each other, set wij to the length of the line segment
that joins their origins. As shown in Fig. 523, place the finite-
weight triples (i,j,wij) into a list, sorted by wij. Next, walk
over the triples in sorted order; for every pair of rays with
Fig. 522 The motif on the left was developed by joining every right
finite weight, add them to the motif if neither ray is yet in
ray to its neighboring left ray. On the right, the motif is corrected by
truncating rays at closer intersection points with rays that are not from use. For reasonable tiles and contact angles, this iterative
adjacent edges in the polygon algorithm will produce a list of correspondences in which

Fig. 523 A demonstration of the greedy method for constructing a pairing. By considering the pairings in increasing order we would use
motif within the bowtie-shaped irregular polygon of Fig. 522, with a the first six (enclosed in a rectangle), consume all 12 rays, and produce
contact angle of 54 . The 20 possible finite-weight ray pairings are the motif on the right in Fig. 522
shown, sorted by the total length of the line segments that make up the
4.4 Motifs 563

Fig. 524 The non-corner-to-corner tiling [(63);3e,2v,3e], an example very short fourth edge of what might appear to be a triangular tile. This
in which the motif generation algorithm must avoid growing rays out of edge should not be used as a source for rays
some edges. In the close-up on the right, the circled region contains a

Fig. 525 A demonstration of


how every contact position must
be split into two when
constructing a two-point pattern.
In the diagram, the contact angle
is chosen to be 45

every ray is used, and from which the motif can be tessellation’s polygonal edges. In two-point patterns, the
constructed.3 rays grow not from a common origin, but from a pair of
In some cases, the axis-based method of constructing points equidistant from the edge’s midpoint. The preceding
tilings, as described in Sect. 4.3.4, can produce tiles that techniques for regular and irregular polygons apply nearly
are not corner-to-corner. Consider, for example, the tiling unchanged for two-point patterns. From a given tile edge,
[(63);3e,2v,3e], shown in Fig. 524. Although it may not be construct Li and Ri as before. Then, given a desired separa-
obvious at a glance, careful inspection reveals that what tion d > 0, displace Li and Ri by distances d/2 and d/2,
appears to be a triangular tile is actually a dart-shaped respectively, in the direction of the tile edge. That is, com-
quadrilateral with a very short fourth edge. This fourth pute a unit vector ~
ui that points along the edge and add ðd=2Þ
edge is a legitimate component of the tiling, but we should ~
ui to the two points that define the ray Li (and similarly for
not treat it as territory from which rays would emanate, most Ri), as shown in Fig. 525. The remainder of the matching
obviously because the neighboring tile opposite that edge process can proceed as before, except that we do not permit
grows no rays at the same location. For this reason, before the motif to make use of the correspondence between Li and
constructing a tile’s rays we consider each of its edge Ri, even though these rays now intersect. We might also need
midpoints in turn, and discard midpoints that will not be to take this extra intersection into account when decorating
met by a corresponding midpoint in a neighboring tile. the resulting motif (as in Sect. 4.5).
When creating two-point patterns, it is common to set the
contact angle to 45 , producing squares centered on edge
4.4.3 Two-Point Patterns midpoints. Other contact angles can be used as well, in
which case rhombs will be produced instead.
As discussed earlier, the acute, median, and obtuse pattern
families use rays that emanate from the midpoints of a
4.4.4 Rosettes

3
A more principled solution is to imagine a weighted bipartite graph in
When presented with a complex visual stimulus such as an
which the 2n rays act abstractly as vertices, and Li is connected to Rj by Islamic geometric pattern, the human eye is predisposed to
an edge of weight wij. The motif with the lowest total length is a invent an explanation that accounts for that complexity
minimum-weight bipartite matching of this graph, which can be (Gombrich, 1998). One way in which this predisposition
found using standard flow-based techniques, as described by Cormen
et al. (2001), Sect. 26.3.
manifests itself is in the tendency to “chunk” the elements
564 4 Computer Algorithms for Star Pattern Construction

of an ornamental design into larger “super-elements” that In practice, rosettes do not always have the canonical
appear together. Examining the design in Fig. 508 and espe- shape suggested above (see, for example, Fig. 357). In par-
cially the decorated versions in Fig. 509, one such super- ticular, the first constraint leaves no flexibility in the rosette’s
element demands attention. It consists of a ten-pointed star contact angle, which creates problems when a template tiling
surrounded by two layers of geometry: a ring of ten contains regular polygons with different numbers of sides. In
kite-shaped quadrilaterals, and a ring of shield-shaped previous work I built a parameterized rosette model based on
hexagons. The device is shown in isolation on the left of deviations from the canonical construction (Kaplan, 2000).
Fig. 526. Following Lee (1987), I refer to it as a rosette. However, it is even better to build the inevitability of
Rosettes pervade the tradition of Islamic design, as can be rosettes directly into template tilings themselves, in such a
seen throughout the rest of this book. Indeed, as shown in way that any compromises that allow them to coexist in a
Figs. 221–225, there are multiple conventions for the single pattern arise naturally as a consequence of using a
incorporation of rosettes within the Islamic design tradition. single, global contact angle. I present here a transformation I
And yet, in the pattern of Sect. 4.1.1 they seem to arise by call the “rosette dual,” which begins with a tiling containing
coincidence, as a fortuitous by-product of the arrangement abutting regular polygons and produces a new tiling that will
of tiles in the template tiling. In this section I demonstrate lead to the formation of rosettes (Kaplan, 2005).
two ways in which we can take the geometry of rosettes into The rosette dual behaves similarly to the construction of
account as part of a software system for drawing star motifs in Sect. 4.4, in the sense that the goal is to erect a
patterns. The first extends the motif drawing algorithm to configuration of line segments within each tile of a template
construct rosettes within regular polygons; the second tiling. But instead of declaring these “motifs” to be the
intervenes earlier in the pipeline, modifying tilings so that endpoint of the construction process, they are stitched
rosettes will arise as they do in the example. together to form a new underlying polygonal tessellation.
Lee articulated a simple method for constructing an The main step of the rosette dual is then to explain how to
n-pointed rosette within a regular n-sided polygon (Lee, construct the necessary configurations within each tile, a
1987), illustrated on the right in Fig. 526. The construction process that depends on the kind of tile under consideration.
hinges on locating what he calls the “shoulder,” labeled S in When the tile is a regular n-sided polygon with n  6, we
the diagram. We can calculate the location of this point by expect that this polygon will hold the central star within a
imposing two aesthetically motivated regularity conditions larger rosette. We fill the tile with a concentric regular
on the rosette. The first is that the outer edges of the shield n-gon, rotated so that the corners of the internal polygon
hexagons align to form (part of) the outline of a regular point to the edge midpoints of the original tile. The “motif”
n-gon inscribed in the tile. This condition is equivalent to will be made up of the internal polygon, together with a set
requiring that S lie on the line MiMi+1 joining adjacent edge of n radial line segments joining corners and edge midpoints,
midpoints. The second constraint is that the four outer shield as shown in Fig. 527. This process is still governed by a free
edges have the same length, which we can fulfill by requir- parameter: the radius of the internal n-gon. We choose this
ing the shoulder to lie on the angle bisector ∠OPi+1Pi in the radius so that the internal side length is exactly twice the
diagram. These two constraints are already enough to fix length of the radial line segments. The rationale is that if a
the shoulder position to be the intersection of a line segment copy of the n-gon is placed adjacent to this one, the adjacent
and a ray. The remaining constraints on the shape of this radial edges in their rosette duals will fuse to create tile
rosette follow from requiring the sides of the shield to be edges of the same length as the internal edges.
parallel to its axis of symmetry. Once again, when the tile is not regular we will face a
wider variety of unpredictable situations, and should there-
fore expect to use a heuristic technique that performs well in
practice. As shown in Fig. 528, we proceed in a manner

Fig. 527 An example of


computing the rosette dual of a
regular polygon, in this case a
decagon. We inscribe a smaller
concentric decagon within the
original, and choose r so that the
length of segment AB is precisely
twice that of AC
Fig. 526 An example rosette (left), together with an illustration of how
its geometry is calculated. The angle bisector of ∠OPi+1Pi is shown as a
dotted line. The intersection of this line with the line segment MiMi+1
defines the “shoulder” S
4.4 Motifs 565

similar to motif inference. Construct a single ray for each tile The degree to which Islamic geometric artists understood
edge that emanates from its midpoint at an angle of 90 the principle of duality as presented above, or applied duality
(as might be constructed with a contact angle of 90 in in the historical canon, cannot be known, but we may still
Sect. 4.4). Truncate rays into line segments by cutting benefit from its explanatory powers and its practical use. The
them off where they meet each other. transformation exposes a deep mathematical connection
The preceding per-tile transformations generate a set of between template tilings that were declared to be intuitively
planar maps, one for each tile shape. We can assemble multi- related previously in this book. It conforms to the alternative
ple transformed copies of these planar maps into a single underlying polygonal tessellations with dual characteristics
master planar map, from which the tiles of the rosette dual that were detailed in Chap. 3—see especially Figs. 134, 200,
may be extracted, as illustrated in Fig. 529. It is necessary to and 354c. It fits well with constructions such as those in
use at least a 2  2 grid of translational units, in order to ensure Figs. 135, 145, 235, 286, 354, 359, and 377. More immedi-
that planar map edges that form partial tiles along the boundary ately, the rosette dual of the tiling used as an example in this
of the translational unit are completed by edges in neighboring section transforms into none other than the example used in
units. When the maps corresponding to neighboring tiles are Sect. 4.1.1; indeed, constructing explicit rosettes in the
joined, they will leave behind spurious vertices, which lie on decagons of the original tiling yields the same final design
the line joining their two neighbors. All such vertices must be as constructing ordinary motifs in the rosette dual.
spliced out of the master planar map. The faces of the resulting Moreover, the rosette dual elucidates a seemingly arbi-
planar map are all tiles of the rosette dual. With a bit of work, trary adjustment that takes place in several places in this
we can extract a subset of those faces that make up a transla- book. Consider the Archimedean tiling (4.8.8), elaborated
tional unit (with the same translation vectors as the original with explicit rosettes in the octagons. We might expect that
tiling), and group them by congruence so that multiple copies building motifs in the rosette dual would produce the same
of a single tile shape are encoded correctly. design, but a small discrepancy arises: the shields of the
The process above can fail when the polygon is suffi- rosettes come out uneven (see Fig. 531). The source of the
ciently irregular. As shown in Fig. 530, groups of rays can problem can be seen in the superposition of (4.8.8) with its
form families of nearby pairwise intersections without con- rosette dual, as in Fig. 532. The radial edge inside the octagon
verging on a single point. In practice, we must identify these (edge AB in the figure) does not have the same length as the
families and collapse them down to single points. This four edges that emerge from the center of the square (for
process can move ray directions away from perpendicular, example, CB), and so where a square meets an octagon they
causing “kinks” when these rays are joined to those from will produce an edge of the rosette dual whose midpoint does
neighboring tiles. The kinks must be identified (and not lie on the edge between the two original tiles. However,
removed) by checking for vertices in the planar map with that original edge must hold the outer tip of the rosette shield
two neighbors that form an angle close to 180 . if the rosette is to be even. The solution, as demonstrated in
Fig. 172, is to adjust the contact position. For tilings that are
constructed via the rosette dual, we can now see the source of
this adjustment, and calculate exactly how it should be car-
ried out: an edge’s contact position should be moved so it lies
on the edge’s intersection with the corresponding edge from
the original tiling. In practice, we modify the representation
Fig. 528 The construction of the rosette dual of the bowtie polygon in of a polygonal tiling so that every edge can store an optional
Fig. 520. On the left, rays are constructed along the perpendicular
explicit contact position if the midpoint does not suffice.
bisectors of the tile’s edges. The rays are truncated to form the motif
on the right

Fig. 529 The construction of a


complete rosette dual tiling. The
diagrams from left to right show
the original tiling with
translational units outlined in
bold, the same tiles with the
motifs of Figs. 527 and 528
inscribed, and the corresponding
translational units of the rosette
dual tiling
566 4 Computer Algorithms for Star Pattern Construction

Interestingly, some template tilings presented in this book elaborating a motif for each different tile shape. These
have the characteristic look of the rosette dual, and produce tools are already enough to produce attractive final
rosettes when motifs are built within them, but could not renderings: take the segments that make up each motif,
have arisen as the duals of simple tilings by regular transform them into position in a translational unit, and
polygons. Consider the template tiling shown in Fig. 435d, stamp out as many units as are needed to fill a region with
featuring 11- and 13-sided regular polygons surrounded by the pattern.
irregular pentagons. It is tempting to search for a source However, apart from simple schematic drawings, Islamic
tiling in which the edges of the regular 11- and 13-gons art is rarely executed in such an abstract manner. Designs are
meet, but as demonstrated in Fig. 435b, such a tiling is richly decorated in a wide range of styles, media, and colors.
impossible. In an ingenious construction, the incompatibility Many of those styles are in some sense nonmathematical,
of these two regular polygons is reconciled by distributing being based on floral design or other freeform elements. But
the error across the rings of irregular pentagons. In principle, there is still a core toolkit of geometric techniques relevant
it should be possible to develop an optimization algorithm in the production of decorated patterns. In this section I
that can effect similar nonsystematic constructions automat- present three such techniques: region filling, thickening,
ically, searching for a configuration that distributes the error and interlacement.
in a manner consistent with the aesthetics of Islamic geo- In what follows, it no longer suffices to consider the line
metric patterns. segments that make up a motif in isolation; we must under-
stand the complete disposition of vertices, edges, and faces
of a motif within a template tile. To that end, let us assume
4.5 Decoration that we have constructed a “tile planar map” for each tile
shape, consisting of the polygonal boundary of the tile
The preceding two sections have provided the fundamental together with the inscribed motif. In this planar map we
building blocks of Islamic star patterns based on the polygo- will use the terms “boundary edges” and “motif edges” to
nal technique: the template tilings, and the means of distinguish the edges originating, respectively, from these
two sources.

4.5.1 Filling

The simplest style of decoration is to assign colors to the


different regions in a pattern. In practice, we choose a color
for each face in a tile planar map, and draw that face as a
polygon filled with its corresponding color. In earlier
chapters, this process was referred to as the “tiling treat-
ment.” Care should be taken to assign colors to boundary
Fig. 530 A difficulty that can arise in computing the rosette dual for faces so that colors are consistent for the faces that share
irregular polygons, illustrated with the dart-shaped quadrilateral of
Fig. 524. On the left, the three perpendicular rays do not meet in a
boundary edges. An example of a filled star pattern was
single point, but in three pairwise intersections (the short fourth edge shown in Fig. 509.
does not contribute a ray). We pick a suitable average location and snap There are many traditional coloring schemes for Islamic
the endpoints of the three line segments to that location geometric patterns, which we will not attempt to capture in

Fig. 531 An illustration of the uneven rosette shields that can arise when naively using motif inference on the rosette dual of a tiling. Unlike the
perfect rosette on the left, the design on the right has shields of two different sizes
4.5 Decoration 567

Fig. 533 When drawing thickened bands in an Islamic star pattern, it


does not suffice to draw each edge of the design in isolation. Different
line cap styles will produce bends that do not close properly, or bends
Fig. 532 A visualization of the required adjustment in contact that are rounded on the convex sides (left). By joining segments
positions in the rosette dual. The shaded pentagon arises naturally in together at bends (right), we can simultaneously render sharp corners
the rosette dual of Archimedean tiling (4.8.8). If we naively use edge and support compatibility with motifs in neighboring tiles
midpoint M as a contact position, we obtain uneven rosette shields, as in
Fig. 531. The contact position for edge AC should be set to B, its
intersection with the edge of the original tiling. That contact position cannot render each line segment in isolation: where motifs
will guarantee congruent rosette shields bend, either caps will be obvious or the joint will be rounded
on one side. Instead, we join individual segments into paths
algorithmic form. But there is one mathematical feature wherever they meet in degree-2 vertices (bends). Each such
shared by many of those schemes: frequently, half of the path can then be rendered with mitered bends and circular
regions are given a single background color, and the other caps (the latter will guarantee that four caps overlap seam-
half share a palette of foreground colors. The colors alter- lessly at crossings in the motif). We can even render an
nate, in the sense no two foreground or background tiles will outline around the bands by rendering slightly thicker
be adjacent to each other. Mathematically, planar maps for bands in a contrasting color in a first pass.
which this sort of coloring is possible are said to be two- That being said, it is useful in some contexts (particularly
colorable. Not every planar map is two-colorable, but bar- interlacement, as discussed below) to compute the complete
ring degenerate cases all the maps constructed as motifs in geometry of the thickened bands from first principles. To
the manner described in Sect. 4.4 will be. In particular, every this end, we construct a polygon, which I call a “band
vertex in a tile planar map will be the meeting point of either polygon,” corresponding to the thickened version of each
two or four edges, which is a sufficient condition to guaran- individual motif edge in the tile planar map. The corners of
tee two-colorability. the band polygon depend on the behavior of the map vertices
This mathematical fact suggests what could be consid- at the start and end of the edge. Let w be the desired width of
ered a preliminary step to assist in region coloring: apply a the band, and consider the situation at one of the edge’s
two-coloring to the faces of every tile planar map. We can vertices, at position P (the geometry at the other vertex can
begin by picking any face containing a boundary vertex and be computed analogously). There are several cases to
coloring it black; we then perform a depth-first search, consider:
walking from a face to its neighbors, coloring white the
neighbors of a black face, and vice versa. The example on • If the vertex is a bend in the motif, the band polygon for
the right in Fig. 509 shows colored tile motifs that might this edge will contain the inner and outer points of its
result from such a process, with some additional color “mitered join” to the edge on the other side of the bend. If
changes applied manually for aesthetic purposes. This algo- the vertex and its two edges form an angle θ, then these
points will lie on the angle’s bisector, at distance
rithm guarantees that like-colored map faces will meet  
across tile edges when tiles are assembled into a pattern. w= 2 sin θ2 from P.
• If the vertex is the center of a four-way crossing in the
motif, we add three corners to the band polygon. The first
4.5.2 Thick Bands and third of these corners are the inner points of the
mitered joins formed by this edge with the edges to its
Another important visual style is to thicken the lines of each left and right at the vertex, computed as above; these are
motif so that they are rendered as wide bands (referred to placed before and after the second corner, namely P itself.
earlier in this book as “widened lines”). Doing so might • The vertex P may also lie on a boundary edge. Usually
superficially seem to be a simple matter of altering the two motif edges and two boundary edges will be adjacent
desired line thickness in one’s rendering library, but some to P, but in the case of two-point patterns there may be a
care must be taken for best results. As shown in Fig. 533, we single motif edge. We determine the geometry by
568 4 Computer Algorithms for Star Pattern Construction

Fig. 534 The computation of the band polygons associated with the vertex P in the cases that the vertex is a bend or a crossing. In the case
rendering of thickened motif edges. The left and center diagrams show of a crossing, P itself must be added as well. In the diagram on the right,
the mitre points that must be added to the edge’s polygon at motif all of the band polygons in a complete motif are outlined in black

imagining copies of the motif edges reflected across the


tile boundary. This reflection will give the geometry of a
crossing or a bend, from which the location of the poly-
gon corners can be determined as above.

Figure 534 shows sample constructions for a bend and a


crossing, together with the result of applying this construc-
tion to every motif edge in a tile. Each motif edge will yield a
band polygon with four, five, or six points, which can be Fig. 535 A demonstration of the placement of line segments to sug-
gest interlacement. On the left, we see a two-colored planar map for a
filled with a desired band color. tile motif. A directed edge from P to Q ends in a crossing and has a
black face on its left. In the center diagram, we join the mitre points at
Q with a line segment (shown artificially thickened). When this process
4.5.3 Interlacement is applied to all directed edges with the same properties, the finished
motif on the right results

A ubiquitous decorative treatment of Islamic geometric


patterns involves adding lines, shadows, or other visual has a definite start and end, as well as unambiguous left and
cues at crossings to suggest that the crossing is constructed right sides (as one would experience by standing at the start
from two ribbons, one passing over the other. These vertex and facing the end vertex). With this information,
crossings are almost always arranged so that a given ribbon there is a simple algorithm for placing line segments that
might be traced through a design and be seen to pass alter- suggest interlacement. If the directed edge from P to Q ends
nately over and under the ribbons it encounters in its in a degree-4 vertex (a crossing), and has a black face on its
journey. left, we draw a line segment joining the mitre points at the
A simple means of indicating interlacement is to draw end of the thickened edge polygon. In this context, we treat a
two parallel line segments at every crossing, aligned with the bend adjacent to a tile boundary as a crossing. This process is
band intended to appear on top. The segments can be ori- illustrated in Fig. 535; a final interlaced design is shown in
ented in one of two ways at every crossing, and we must Fig. 509.
choose the orientations consistently. It turns out that there is
a close connection between the two-colorability of a planar
map and its ability to be represented as an interlacement, and 4.6 Extensions
so we can make use of the information prepared in the filled
and thickened decoration styles to determine the segments The study of the mathematical structure of Islamic geomet-
that convey interlacement. ric patterns is, to some extent, an exercise in archaeology.
We begin by computing a two-coloring of the faces of the We are the benefactors of a vast library of extant patterns,
tile planar map, as described above in the context of filling. artifacts that have survived or been recreated through more
We then compute and draw the thickened band polygons of than a thousand years of practice. On the other hand, we
the previous decoration style, together with a contrasting have all too little direct documentation on how these patterns
border. Now, consider every directed motif edge of the tile were first developed. Even taking into account the evidence
planar map in turn. The edges of the planar map have no for the polygonal technique cited in Chap. 2 (most notably
preferred direction; instead, we treat the edge joining verti- the Topkapı Scroll), the precise manner in which this meth-
ces P and Q as a pair of directed edges, one running from odology was put into practice will always remain open to
P to Q and the other from Q to P. Note that a directed edge conjecture. We are therefore left with the fascinating puzzle
4.6 Extensions 569

of reconstructing the mindsets and mathematical toolkits of 4.6.1 Parquet Deformations


artisans of centuries long past.
But the story need not end there. Regardless of how The contact angle used to construct motifs can be varied
closely the techniques presented in this chapter might align smoothly, producing a continuum of possible designs
with their more laborious manual counterparts, they repre- (though for some template tilings, certain angles are more
sent a productive source of ideas that can impart momentum canonical than others). There is no reason why the contact
to the contemporary practice of Islamic art. The computer is angle cannot also be varied spatially within a single design,
an ideal technology for geometric design, with its capacities producing a pattern that undergoes a slow, graceful meta-
for tireless repetition and effortless exploration of large morphosis (Kaplan, 2005). I have experimented with these
design spaces. Furthermore, we have access to modern “spatial animations.” I generate a long, narrow strip of the
mathematical ideas that were beyond the reach of the template tiling. Then, for each edge midpoint, I choose a
designers of historical patterns. In my research, I have been contact angle for its rays based on the position of the mid-
fascinated by the search for new kinds of Islamic geometric point as a fraction of the way from the start to the end of the
patterns that would have been inconceivable or impractical strip. The contact angle might be different for every edge
without the mathematics and computer science available to midpoint in a given tile, but the motif generation algorithm
us today. I close this chapter by offering a sampling of recent can still operate as before. Two examples of this process are
work in this vein, by myself and others. In this instance I will shown in Fig. 536. Note that these designs are able to
not attempt to explain the required mathematical concepts, transition gradually between acute, median, and obtuse pat-
but I will provide references with additional information. tern families.

Fig. 536 Two examples of parquet deformations. The top diagram The bottom drawing is a parquet deformation based on the tiling of
shows isolated motifs constructed with continuously varying contact Fig. 503, with colors added manually in Adobe Illustrator
angles, which are then elaborated into a complete design in the middle.
570 4 Computer Algorithms for Star Pattern Construction

I name such designs “Islamic Parquet Deformations,” top-level tiles can sometimes form a substitution system.
after the design style pioneered by Huff and described by Mathematically, such isolated regions can usually be
Hofstadter (1986). They are also inspired by, and share shown to correspond to non-periodic tilings, at least if the
aesthetic qualities with, Escher’s use of metamorphosis underlying tiles can be grouped any number of times into
(Kaplan, 2008). larger units.
As a first example, consider the simple tiling of the plane
from rhombs with interior angles of 72 and 108 , radiating
4.6.2 Substitution Systems and Non-periodic outward from a single center of fivefold rotation. This tiling
Tilings must be non-periodic (any translational symmetry would
have to map the fivefold center onto another such point, an
This chapter has focused on the construction of Islamic impossibility). As discussed at the end of Sect. 4.3.4, we can
geometric patterns based on periodic tilings, but many place regular decagons at every vertex of this tiling. We can
more opportunities await in the use of tilings that are not then construct the rosette dual of that tiling and place motifs
periodic, or even in patches that cannot obviously be in the tiles to produce a non-periodic star pattern, as shown
extended to tile the entire plane. There is a clear tradition in Fig. 537. The novelty here is that we cannot rely on the
of historical patterns with radial symmetry that depart from periodic replication algorithm of Sect. 4.3.2; in some sense,
periodicity. For example, Castera chronicles a wide range of the algorithm that fills a region with tiles from this tiling
tilework fountains in Morocco, most of which feature a must be developed as a special case.
complex radial design surrounding a central many-pointed This example suggests that we might be able to construct
star (Castera, 1999a). The present book demonstrates several star patterns in three phases instead of two, by introducing
contemporary examples of non-periodic Islamic designs, rhombs as a scaffolding to guide the placement of the tem-
including a multilevel quasicrystalline design based on a plate tiles. Each rhomb contains a fragment of the template
substitution tiling and Penrose-like edge matching tiling, with an emphasis on placing regular polygons at the
conditions (Fig. 481); single-level and multilevel sevenfold corners. The fragments are chosen so that a consistent set of
radial patterns (Figs. 285 and 488); and a single-level pattern tiles is produced when rhombs are assembled in legal
with forced aperiodicity as per Penrose matching rules configurations. The tiles can then be used to construct motifs,
(Fig. 480). The occurrence of aperiodicity within the histor- or the motifs can be inscribed directly in the rhombs. Fig-
ical record is problematic. The historical examples of multi- ure 538 shows one such construction based on assigning
level designs in Chap. 3 have overall translation symmetry, motifs to the two Penrose rhombs, which I previous
though every translational unit contains a very large amount demonstrated in Sect. 3.10.1 of my dissertation (Kaplan
of geometric information. However, isolated regions of the 2002). Several previous authors have proposed such an

Fig. 537 An example of a


simple non-periodic Islamic star
pattern, created by extracting a
rhombic motif from a simple
periodic star pattern and
replicating that rhomb in a radial
arrangement outward from a
fivefold center
4.6 Extensions 571

Fig. 538 The development of a


non-periodic star pattern based on
Penrose rhombs. In (a), the two
Penrose rhombs are shown with
decagons centered at their
corners. In (b), the resulting
template tiles are inscribed with
motifs, with some editing needed
to handle the two overlapping
decagons in the 36 rhomb.
Finally, in (c), the collected
motifs are clipped to the rhombs (a) (b)
and assembled into a star pattern
using a small fragment of a
Penrose tiling

(c)

approach for making non-periodic Islamic patterns with the In a substitution tiling, every tile shape is equipped with a
two Penrose rhombs, as well as with the closely related “kite rule showing how it can be replaced by a configuration of
and dart” tiling; as with the example above, some of these smaller tiles. See Fig. 483 for an example. More information
decorated tiles can also form periodic patterns (Castera, on substitution tilings can be found in Sect. 6.1 of my book
1999b; Rigby, 2006). As shown in Fig. 480, it is also possible (Kaplan 2009a). By starting with a single tile and iteratively
to construct motifs for the Penrose rhombs that conform to applying the substitution rules, we can produce a patch
Penrose’s original matching conditions, preventing any peri- of tiles of any desired size. Several mathematicians and
odic patterns from being assembled (Makovicky et al., 1998). designers have experimented with substitution as a means
The rhombic technique can be further generalized. The of producing template tilings. Research by Makovicky
Penrose rhombs are an example of a lattice projection tiling, (Makovicky et al., 1998), Bonner (2003), Lu and Steinhardt
an orthogonal projection of a carefully selected set of faces (2007a), and Cromwell (2009) has speculated on the extent
in a high-dimensional cubical lattice (Senechal, 1996). The to which historical artisans may have had some intuition for
number of dimensions (five, in the Penrose example) can be the substitution process, and the extent to which these his-
chosen arbitrarily, producing tilings with different local torical examples might be considered self-similar and/or
orders of symmetry, made from rhombs that can accommo- quasicrystalline. This topic continues to generate consider-
date regular polygons of different orders at their vertices. able debate; Jay Bonner’s views appear in previous chapters.
The main difficulties with these rhombs are choosing addi- Some past work has also sought to use substitution to
tional tiles to fill the spaces between the regular polygons, produce geometric patterns directly, without the scaffolding
and dealing with the frequent occurrence of regular polygons of a template tiling. These approaches are sometimes called
that overlap across thin rhombs (Kaplan, 2002). “modular”: they are based on packing the plane with the final
572 4 Computer Algorithms for Star Pattern Construction

elements of a design (Cromwell 2012b). Castera presented a regular polygons (Conway et al., 2008; Dunham et al.,
substitution system based on a subset of “Zellij” tiles, in 1981), and there are algorithms for filling the Poincaré disc
which each tile is replaced by an assembly of the others with as many tiles as are desired (Dunham, 1986; Epstein
(Castera, 2003). The patches that result from applying mul- et al., 1992). Even more complex algorithms such as the
tiple rounds of these sorts of substitutions typically do not axis-based construction of tilings and the rosette dual can be
offer any suggestion of translation symmetry. adapted to hyperbolic geometry.
With a bit more work, we can produce a self-consistent
definition of the geometry of the surface of a sphere (Kay,
4.6.3 Non-Euclidean Geometry 1969), where lines are great circles, i.e., circles whose radius
is the same as that of the sphere. In this world parallel lines
The foundations of geometry, as practiced by historical do not exist, but what remains is still rich enough to support
Islamic artisans, consisted of Euclid’s Elements. For the construction of Islamic star patterns.
centuries, Euclidean geometry was accepted dogmatically With care, we can even formulate the construction of star
as a correct description of the universe. In the nineteenth patterns in a parallelism-agnostic way, so that the shape of
century, however, mathematics was revolutionized by the space is merely one more parameter to the algorithm
realization that formulations of geometry could exist in (Kaplan and Salesin, 2004). By fixing other choices (such
which the parallel postulate, one of the five axioms upon as the multipliers in the axis-based tiling construction) and
which Euclidean geometry is based, was false (Greenberg, varying the choice of geometry, we can then produce
1993). conceptually related families of Euclidean and
Today, mathematicians are comfortable leaving the non-Euclidean patterns (see Fig. 539).
familiar, flat world of the Euclidean plane and venturing It is also possible to begin with an already defined Euclid-
into so-called non-Euclidean geometries. One equivalent ean design, and translate it into non-Euclidean geometry
form of the parallel postulate states that given a line L and (accepting some amount of distortion as part of the process).
a point P, there exists exactly one line L0 that passes through As a simple example, we might consider extracting a suit-
P and is parallel to L. In hyperbolic geometry, there may be able square region from a star pattern based on the (44) tiling,
many such lines L0 . The existence of multiple parallels may mapping the square to the faces of a cube, and “inflating” the
seem counterintuitive, but we can construct a number of cube by projecting every point to the surface of a concentric
entirely self-consistent models of the hyperbolic plane in sphere. Mathematicians von Gagern and Richter-Gebert
which they exist. For artistic applications, the most suitable (2009) demonstrated a sophisticated analogue of this process
model is the Poincaré disc, in which the plane is defined to that can translate Euclidean patterns to the hyperbolic plane.
be the interior of a unit disc and lines are circular arcs that As demonstrated in Fig. 540, it is even possible to map
meet the boundary of the disc at right angles (Greenberg, Euclidean designs to the surface of a three-dimensional
1993). There is a precedent for the use of the Poincaré disc in model, as long as the surface can be parameterized in a
art, most notably in M.C. Escher’s Circle Limit prints suitable way (Kaplan, 2009b).
(Schattschneider, 2010). From the point of view of Islamic
geometric patterns, nearly all the machinery we have devel- Craig Kaplan is an Associate Professor of Computer Science at the
oped in this chapter continues to operate. We can still define University of Waterloo in Waterloo, Ontario, Canada. He studies the
points, lines, rays, and segments; measure distances and application of computer graphics and mathematics to problems in art,
angles; and construct regular and irregular polygons and architecture, and design and is an expert on topics such as Islamic
geometric patterns and computational applications of tiling theory. He
more general planar maps. Periodicity is no longer a well-
is one of the organizers of the annual Bridges conferences on art and
defined notion, but the regular and Archimedean tilings mathematics.
generalize into an infinite family of symmetric tilings by
4.6 Extensions 573

Fig. 539 Three star patterns with similar underlying geometry, rendered in the Euclidean plane, the surface of a sphere, and the hyperbolic plane

Fig. 540 A two-point Islamic star pattern based on the regular tiling by hexagons, mapped onto a 3D Bunny model

You might also like