Introduction

The shape grammar discourse, particularly in the context of tiling, provides a formal design language to generate and analyze shapes and patterns. This discourse, through its standardized language of rules and terminologies as well as its use of visual computation, helps to represent and clarify complex processes step-by-step. Combinatorics, the field of mathematics which deals with counting and arranging, is an area that can benefit from the visual logic shape grammars provides. In 1704, Sebastien Truchet examined the ‘graphical treatment of combinatorics’ in his paper Mémoire sur les Combinaisons, in which he analyzed the combinations and patterns attainable from a set of bi-colored square tiles (Fig. 1) (Truchet 1704; Smith and Boucher 1987). His work utilized visual representations of complex combinatorial problems to better understand and represent counting methods, and to highlight the possible visual patterns that mathematics may overlook. Truchet’s fascination with the visual representation of combinatorics for both arrangement analysis and pattern generation closely aligns with the aspirations of the shape grammar discourse. This study embraces this shared interest, aiming to explore how shape grammars can formalize and broaden our comprehension of Truchet tiles and their potential applications in design.

Fig. 1
figure 1

Truchet’s tile arrangements: (a) Table I shows Truchet’s square tiles in different placements and orientations; (b) Table II shows the reduction of combinations shown in Table I. Image: reproduced with permission from The Huntington Library

In 1987, C.S. Smith published ‘The Tiling Patterns of Sebastien Truchet and the Topology of Structural Hierarchy’, in which he analyzed Truchet’s treatise and its connection to crystallographic symmetry and color symmetry (Smith and Boucher 1987). Within this analysis, Smith introduced the now-recognized variation of Truchet’s original tile. While Truchet described a set of square tiles, each bisected diagonally into two colored triangles (Fig. 2a), Smith’s variation used quarter-circle arcs in diagonal corners, replacing the two triangles of Truchet’s original tile. The arcs bisect the square tile edges at their midpoints, so that when the tiles are arranged adjacently, a set of connected curves appear (Fig. 2b). The rotational symmetry of both Truchet’s original tile and Smith’s variation allow for a multiplicity of tiling arrangements. This research employs Smith’s variation of Truchet’s tile, henceforth known as The Truchet Tile, as the basis for the Truchet Tile Grammar.

Fig. 2
figure 2

Sebastian Truchet’s original tile and C.S. Smith’s variation: (a) Sebastien Truchet’s bi-colored tiles, possible combinations of two tiles, and an example tiling pattern; (b) Truchet Tiles, possible combinations of two tiles, and an example tiling pattern. Image: redrawn Tiles based on Smith and Boucher 1987

Background

Drawing upon Smith’s investigation of the Truchet tile, this research explores the design of additional Truchet tile variations through the utilization of shape rules. Shape rules constitute the fundamental building blocks of shape grammars, and are written in the generic form A → B, where shape A, at times embedded within the design context, is substituted with shape B. The visual computations described in shape rules operate directly with points, lines, planes, and/or volumes. A shape grammar is a set of shape rules employed sequentially to generate designs (Stiny 1980). This research utilizes shape grammars to generate diverse variations of the Truchet tile, thereby defining a generative tiling system. An important specification of the Truchet Tile Grammar is the characterization as a set grammar, meaning that while standard shape grammars recognize emergent shapes, set grammars do not. Instead, the tiles are treated as symbolic objects, and ‘the integrity of the compositional units in designs is thus preserved’ (Stiny 1982). While the combinations of tiles in this grammar do produce emergent shapes to the eye, the emergent shapes cannot be considered compositional parts and cannot be recombined or decomposed in different ways with the current shape rules of the grammar.

Additionally, the Truchet Tile Grammar also classifies as a color grammar. Knight defines a color grammar as an ‘extension of a shape grammar in which colored labelled shapes, rather than labelled shapes, are used to define the components of the grammar’ (Knight 1989). The Truchet Tile Grammar assigns color fields to specific areas of the 2D and 3D tiles to act as weights. The terminology, relationships, and operations of color fields used in this grammar reflect the formal definitions given in Knight’s original manuscript.

To our knowledge, there is no existing research that combines Truchet tiling and shape grammars; however, there are existing studies on Truchet tiling in general, exploring its generative specifications, particularly in the fields of computer graphics, mathematics, and generative art. Bosch and Colley (2013), in their paper ‘Figurative mosaics from flexible Truchet tiles’ modify Truchet tiles to explore how a collection of tiles can be used for halftoning mosaics. They explore how both Truchet’s original tile and Smith’s variation affect the ‘readability’ of the mosaic. Mitchell (2020), in the conference paper ‘Generalizations of Truchet Tiles’, explores the use of different tile shapes and types of arcs to generate artwork. Lord and Ranganathan (2006) further explore the generalizations of Truchet tiles in their paper titled ‘Truchet tilings and their generalisations’. They examine potential three-dimensional analogues of the Truchet Tile and the orientations of such tiles.

The advantage of exploring Truchet tiling through shape grammars is that rule-based specifications create a defined systematic framework. This framework allows for a structured analysis, as well as the translation of Truchet’s combinatoric logic to generate new tiles and tiling designs with visual computations.

The Truchet Tile Grammar

The Truchet Tile Grammar comprises three distinct rule sets, or stages: 1) Two-dimensional Tile Rules, 2) Two-dimensional Pattern Rules, and 3) Extruded Tile Rules. When applied iteratively, this grammar generates extruded tiles. These rule sets can also be independently utilized based on design intent.

Two-dimensional Tile Rules

A pivotal design operation of Truchet’s tiling system is the orientation of a single tile, offering an initial framework for translating Truchet’s logic into a rule-based specification. The first set of shape rules is thus used to generate two-dimensional tiles. Although the Truchet Tile is exclusively based on squares, the generic rules in the Truchet Tile Grammar expand Truchet’s tiling logic to include other regular and irregular polygons that can tile a plane and introduce more tiling variations.

The grammar begins with two initial shape rules, iR1 and iR2, to generate a labelled polygon on the cartesian plane (Fig. 3). These two rules are designed to allow for the recursive generation of a closed n-gon. Initial Rule 1 (iR1) generates a single edge of a polygon inscribed in a circle based on the specification of an angle, a1. Then, initial Rule 2 (iR2) produces additional edges and should be applied recursively until the sum of all angles equals 360 degrees to ensure that a closed polygon is generated (\({\sum }_{i=1}^{n}{a}_{i}=360\)). The subsequent two-dimensional tile rules vary slightly between polygons with an even number of sides (n = 2 k) and polygons with an odd number of sides (n = 2 k + 1). Therefore, it is important at this stage to determine the number of sides of the generated polygon. Though the initial shape rules can generate any closed polygon (regular and/or irregular), the two-dimensional shape rules are more clearly explained using regular polygons that can tesselate a plane, and will henceforth be shown using the initial shapes of a regular triangle, square, and hexagon (Fig. 4). It is important to note that the Truchet logic will still work on any polygon (or combination of polygons) that can tile a plane, as long as the shapes share adjacent edges of the same length.

Fig. 3
figure 3

Initial shape rules to place a labelled polygon in the cartesian plane

Fig. 4
figure 4

Regular polygons generated with initial shape rules

After the initial shape rules, those consisting of sum operations and general transformations are then applied recursively to generate a single tile. To generate Truchet tiles and variations on them, each tile is specified as a closed shape with arcs in diagonal corners, and the degree of the arc is controlled by parametric variables (centroid: \(({x}_{0},{y}_{0})\); radius: \({r}_{0}\)). Examples of different arc conditions in a square shape can be seen in Fig. 5.

Fig. 5
figure 5

Possible arc conditions in a square shape

As previously stated, the rule sets in this stage differentiate between polygons with an even number of sides and polygons with an odd number of sides. The main difference is that for polygons with an even number of sides, the arcs are applied to every-other corner. For odd-numbered sided polygons, the colored shapes can be applied to all corners of the polygon.

The two-dimensional tile rules begin with the rule R1, which bisects a labelled line segment with a circle label. Rule R2 assigns a parameterized colored labelled shape to a corner of a polygon by connecting two circle labels and corner line segments with a line. Rule R3 replaces the line with an arc of some degree. A parameterized colored labelled shape has the notation ⟨s, P, F⟩, where s is a parameterized shape, P is a set of labelled parameterized points, and F is a parameterized color field (Knight 1989). In this case, s is the closed shape generated consisting of two corner segments and an arc of some degree, P is the arc’s center point, and F is the grey color field assigned within the shape.

Rules R4 and R5 remove the labels from the shapes. The colored shapes generated in Rules R1-R3 are used as weights to differentiate specific areas of the tiles (Knight 1989; Stiny 1992). These weights are subsequently used to inform the parameters of the extruded tile rules later in the grammar. Rule R6 is employed to invert the color fields within the shape, a convention used in this stage to generate a pair of inverse tiles with complementary color fields.

The last rule in the two-dimensional tile rule set, R7, outlines what occurs if two colored shapes intersect. As stated above, a parameterized colored labelled shape has the notation ⟨s, P, F⟩ (Knight 1989). Rule R7 states that if two colored shapes intersect, the color field of their intersection changes colors, resulting in a third color field. It is noted that F1 and F2 represent two light grey color fields, and F3 represents their intersection, shown as a dark grey color field.

The Two-Dimensional Tile Rules can be seen in Fig. 6, and a sample derivation using the Two-Dimensional Tile Rules to generate a square tile can be seen in Fig. 7. In the derivation, initial rule iR1 is applied once to start the generation process. Then, initial rule iR2 is applied three times to produce the boundaries of a square tile. Once the tile shape is produced, the two-dimensional tile rules are applied to create a pattern within the boundaries of the tile shape. First, rule R1 is applied to all four sides of the square to bisect each labeled edge with a circular label. Next, rule R2 is applied twice to connect the bisected edges and define the parameterized colored labelled shapes at two opposing corners of the square tile. These colored shapes are then refined with two applications of rule R3 to specify the arc designs within the tile boundaries. Rule R5 is then applied to remove the labels that guided the generation process, resulting in one patterned two-dimensional tile. The two-dimensional tile rules are complete when two tile patterns are produced, which is accomplished with the application of rule R6 to invert the color fields of the first tile so that a second complementary tile is produced.

Fig. 6
figure 6

Two-dimensional Tile Rules

Fig. 7
figure 7

Sample derivation using shape rules to generate square tile

To further explain the two-dimensional tile rules, Fig. 8 illustrates the generation of pairs of complementary triangular, square, and hexagonal tiles. These examples are given for two purposes: first, to illustrate how the two-dimensional tile rules work with different initial shapes; and second, to demonstrate the need for and functionality of rule R7.

Fig. 8
figure 8

Sample derivation using shape rules with triangle, square, and hexagon shapes

The interested reader can follow the production step-by-step in comparison to the previous derivation in Fig. 7. The application of rules R1 and R2 is easy to relate to the previous tile generation. However, the new conditions occur in the application of rule R3, where two examples of different arcs are given for each tile to exemplify the issues that arise with overlapping patterns of arcs. For ease of comparison, one tile design for each initial shape is given without overlapping arcs and a second tile design is shown with overlapping arcs. When overlapping arcs are created, rule R7 must be applied to differentiate a third color field in the tile design as shown in the fifth row of the figure. Once this is resolved, rules R4 and R5 are applied to remove labels, resulting in six unique tile designs. The application of rule R6 generates the inverse of each tile to produce six complementary pairs of tile designs, two pairs for each initial shape.

Two-dimensional Pattern Rules

The second set of shape rules defines the two-dimensional pattern rules to generate a planar tiling design. These rules are used to create basic tiling configurations and then to place specific tile motifs within a basic pattern. Based on the nature of the Truchet Tile, the shape rules make use of rotation and reflection while generating the two-dimensional tiling configurations. These rules also use weights and labels to specify the orientations of each tile and to distinguish between the pairs of complementary tiles generated with the previous rule set.

One key difference in the pattern generation of Truchet’s original patterns and the Truchet Tile Grammar is the orientation of specific tiles based on tile combinations. The design intention of this rule set is to arrange the tiles so that adjacent colored fields meet to ensure that tiling patterns achieve the continuity and closure of the original Truchet tile. To see this visually, Fig. 9a shows ideal tile combinations and Fig. 9b shows unideal tile combinations that are eliminated in the grammar.

Fig. 9
figure 9

(a) Ideal tile combinations; (b) Unideal tile combinations

This additional rule restraint reduces the amount of potential tile combinations, which we explore in a similar combinatorics exercise as Truchet, seen in Fig. 10. This exercise explores how a single pair of inverse tiles (Fig. 10a) can generate unique tile combinations. Figure 10b includes the two unique orientations for each of the tiles. Figure 10c presents eight possible pairs of the two tiles, Fig. 10d presents the four possible pairs of tiles where the adjacent color fields meet, and Fig. 10e reduces these configurations to include only the three unique tile combinations where the adjacent color fields meet.

Fig. 10
figure 10

Visual combinatorics of the Truchet Tile: (a) single pair of inverse tiles; (b) unique tile orientations; (c) all possible pairs of two tiles; (d) all possible pairs of tiles where the adjacent color fields meet; (e) unique pairs of two tiles where the adjacent color fields meet

Smith’s variation of the Truchet Tile, due to its two diagonal lines of symmetry, has unique combinatorial properties. When rotated 180°, the tile still appears the same, thus reducing the amount of unique tile combinations. By decreasing the number of lines of symmetry in a tile, the amount of possible unique combinations increases. This is explored in a second combinatorics exercise, seen in Fig. 11. This exercise explores the potential tile combinations of a square tile (and its inverse) with only one line of diagonal symmetry (Fig. 11a). Each of these tiles can be arranged in four different orientations as shown in Fig. 11b. These two tiles can be arranged in 64 possible pairs (Fig. 11c) and 32 of these are where the adjacent color fields meet (Fig. 11d). As shown, the total number of unique pairs where adjacent color fields meet increases from 3 to 12 pairs when the number of lines of symmetry decreases from 2 to 1 (Fig. 11e).

Fig. 11
figure 11

Visual combinatorics of a tile with one line of symmetry: (a) single pair of inverse tiles; (b) unique tile orientations; (c) all possible pairs of two tiles; (d) all possible pairs of tiles where the adjacent color fields meet; (e) unique pairs of two tiles where the adjacent color fields meet

The two-dimensional tile rules can generate tiles with varying numbers of lines of symmetry (Fig. 12). This will, as shown in the exercise above, vary the number of unique combinations of tiles where the adjacent color fields meet. The two-dimensional pattern rules use shape rules to transform these combinatoric exercises into a rule-based logic. To follow these conventions, a series of pattern rules are needed for any initial tile shape. To present the basic logic of such rules here, the pattern rules are presented with square tiles for clarity.

Fig. 12
figure 12

Lines of symmetry in generated Truchet Tiles

The two-dimensional pattern rules can be defined by the schemas x → x + t(x) and x → x + t(x’), in which a translated version of a tile, t(x), or a translated and inverted version of a tile, x’, is copied adjacent to that tile. ‘x’ is depicted as a blank square while ‘x’’ is depicted as a patterned square. Both squares have an arrow label to represent tile directionality. Figure 13 presents rules R8-R39. These 32 rules depict all possible combinations of the two tiles, equivalent to Fig. 11d, so that tiling patterns can be generated for any array of square tiles. For each tile type, eight rules are given for adjacencies of the initial tile (R8-R15) and eight rules are given for adjacencies of the inverted tile (R16-R23). Rules R24-R39 are for adjacencies of the initial tile with the inverted tile. Providing all of these conceptual rules allows for the designer to produce an array on the fly, adding tiles incrementally until a desired tiling pattern or overall proportion is achieved.

Fig. 13
figure 13

Two-Dimensional Pattern rules for square tiles

Once a tiling pattern is generated, the schema x → y is then employed to substitute the representative squares with the tiles designed in the previous rule set. Rule R40 is written as a conditional statement, stating that if x is one tile, then x’ is its inverted pair. Rule R40 can be seen in Fig. 14.

Fig. 14
figure 14

Rule 17 depicting the tile substitution rule

To better visualize the two-dimensional tile rules, Fig. 15 presents rules R8-R39 with the substituted tile motifs in place of the representative squares. Here, the resulting tiling potentials are more apparent as each spatial relationship results in a unique configuration. More specifically, rules R8-R15 focus on spatial relationships between pairs of one tile, rules R16-R23 focus on spatial relationships between pairs of the inverted tile, and rules R24-R39 focus on spatial relationships between pairs of both tiles.

Fig. 15
figure 15

Two-dimensional pattern rules with substituted tiles in place of the representative squares

Rules R8-R39 can be applied recursively until the pattern meets the design requirements (size, pattern, etc.). Figure 16 presents a sample derivation using the two-dimensional pattern rules to generate a 9-square-grid. First, rule R32 is applied to establish a relationship between a pair of complementary tiles. Rule R8 is then applied twice, first to complete the horizontal row of three tiles and second to turn the corner to initiate the generation of the second row of tiles. Rule R24 adds a second tile, followed by rule R16 to complete the second row. Rule R27 is then applied to start the third row, followed by rules R37 and R28 to complete the nine-square tile pattern.

Fig. 16
figure 16

Sample derivative using the two-dimensional pattern rules to generate a 9 square grid

Once the pattern is generated, the representative tiles can be substituted with the Truchet tiles generated in the first rule set to visualize the tiling design. Figure 17 illustrates a range of possible patterns created with square tiles using the shape rules of the first and second stages of the grammar. In the first row of the figure, the placeholder tiles used for pattern generation are given alongside five pairs of inverse tiles (Fig. 17a). The first column of the figure shows three different grid arrangements (b, c, d), which are substituted with the tiles above. The resulting 15 tiling patterns give a sense of the range of possible configurations that the grammar can produce.

Fig. 17
figure 17

Sample two-dimensional tiling configuration with different two-dimensional Truchet tiles

To better illustrate how the two-dimensional tile rule logic extends to other tile shapes as well, Fig. 18 exemplifies different pattern varieties that can be generated with different tile shapes. Each of these designs uses a similar logic for relating tiles so that patterns can be generated that adhere to the same set of principles.

Fig. 18
figure 18

Pattern variations

Extruded Tile Rules

The third and final rule set in the Truchet Tile Grammar is the extruded tile rules, which transform the two-dimensional tiles into extruded tiles. Parametric shape rules are used to control the depth of different regions of the individual tiles, which were previously specified with the color weights assigned. More specifically, when two color fields are present in a tile motif, two depth parameters, d and e, are required. It follows that three color fields necessitate three depth parameters, c, d, and e. There are different rule sets within this stage depending on the desired panel shape. The following rules, shown in Fig. 19, are to generate extrusion-based panels. These three rules are given to illustrate how different specifications can be encoded for pairs of complementary tiles (rules R41 and R42) as well as tiles with three color fields (rule R43). When the depth parameters are constrained to the same values for each rule, the resulting patterns will achieve matching surfaces alongside the visual correspondence of the color fields.

Fig. 19
figure 19

Rules 41, 42, and 43 for extrusion-based panels

To demonstrate the power of these rules, Fig. 20 shows five extruded patterns based on the two-dimensional tiling configurations exemplified in Fig. 17. The panels shown here are generated using rules that transform the two-dimensional tiles into extruded panels through extrusion. Note that the depth parameters of the extruded tile pairs match to achieve continuity of the extruded surfaces.

Fig. 20
figure 20

Sample patterns with different extruded Truchet tiles

Discussion and Conclusions

The Truchet Tile Grammar presented in this paper is an open-ended generative system for designing tiles and patterns. This grammar builds on Sebastien Truchet’s visual combinatorics and C.S. Smith’s tile variations while defining the two-dimensional pattern rules, but also expands it to include more variations in terms of tile geometry and shape.

The Truchet Tile Grammar can be useful for various design scenarios. The grammar can be used for designing and manufacturing floor tiles and wall panels that can generate visually interesting and customizable patterns with only a small subset of unique components. On the other hand, the use of the Truchet Tile Grammar is not limited to designing architectural tiles and panels. As March (2015) has discussed in ‘Mathematics and Architecture since 1960’, these kinds of formalisms can also be used in urban planning and spatial design. The recent conceptual Tile House project by Matsys, for instance, makes use of Truchet tile logic in the generation of plan layouts (Matsys 2021).

To make it easier for the reader to follow the Truchet Tile Grammar’s logic, the tiling exercises exemplified in the paper made use of tiles that are based on regular polygons (triangle, square, hexagon) and that can tessellate a plane. Both the two-dimensional tile rules and extruded tile rules can, however, be used to generate Truchet tiles with other regular and irregular polygons as their basis. Two-dimensional pattern rules can also be extended to include additional rules to generate other periodic and aperiodic tessellations based on the Truchet tiling logic.

Additional studies could explore the integration of algorithmic pattern generation tools, such as Parakeet, Paneling tools, or Lunchbox, to experiment with the Truchet Tile Grammar through custom parametric components. Programming the grammar rules in a visual algorithmic environment would aid in the applicability of the grammar and allow for further in-depth experimentation.

Truchet, similar to his tiling system, had developed a patented dry-assembly flat vault construction system, Truchet Vault, that uses only one kind of voussoir (Lecci et al. 2020) arranged in a way to hold the whole structure together. Truchet’s flat vault system has been recently translated into a barrel vault construction system (Fallacara 2009) and into a system to tessellate non-planar surfaces (Vella and Kotnik 2016) by means of topological transformation. Future research will expand the three-dimensionality of the Truchet Tile Grammar rules for generating Truchet Vaults, planar and non-planar, using interlocking three-dimensional tiles.