Rendering Grayscale Images with Square and Hexagonal Generalized Truchet Tiles
Year: 2024 Authors: Izzy Snyder
Core claim
Edge-matched ABA tile families can be assigned by grayscale value to render continuous grayscale mosaics from target images.
Topics
grayscale image rendering, edge-matched mosaics, Truchet tiles, photo mosaic algorithms
Domains
tessellation, polygon tilings, error minimization, generative art, mosaic design, opt art
Methods
photo mosaic assignment, tile grayscale matching, random rotation, Floyd-Steinberg dithering
Media
black-and-white tiles, square tiles, hexagonal tiles, laser cutting
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Bridges 2024 Conference Proceedings
Rendering Grayscale Images with Square and Hexagonal Generalized Truchet Tiles
Izzy Snyder
Brattleboro, Vermont, USA; isnydr@oberlin.edu
Abstract
This paper explores a method of rendering grayscale images out of two families of black-and-white generalized Truchet Tiles. One set of these tiles is square and the other is hexagonal. The tiles within each set share the same symmetric edge patterns while having varying inner patterns. This lets them mesh seamlessly together regardless of rotation and perfectly tile the plane while allowing for varied overall tile darkness. This property makes this and similar tile families a fantastic building block for depicting grayscale images and designs.
Introduction
In this paper, we introduce a method of rendering grayscale images through mosaics of generalized duotone Truchet Tiles. The works in this paper are examples of “edge-matched mosaics”, tessellation patterns in which tiles are laid down such that the patterns on the edges of the tiles match [2]. This paper focuses on edge-matched mosaics of two regular polygons, squares and hexagons, with consistent two-color symmetrical edge patterns and inner patterns that vary in overall darkness. This property of varying inner darkness with consistent edge patterning allows for tiles to create continuous designs regardless of rotation or placement within the pattern grid while allowing for variation in the overall darkness of regions of the mosaic.
We take advantage of this property to depict target grayscale images using families of generalized duotone Truchet Tiles, building upon previous work by Bosch [2], Wendt [9], Batchelder [1], and others. We use tiles that allow for easy pattern continuity through edge matching while offering a variety of inner patterns. Figure 1 shows random and pattern continuity tilings of the original Truchet Tile [7] and a common variation often called the Truchet-Smith Tile [6]. These tiles follow an A-A-B-B and AB-BA edge pattern respectively, using the naming system presented by Virolainen [8], where A represents white, B represents black, and a hyphen represents a vertex. Due to the different patterns of edges on these tiles, care must be taken to place the tiles in positions and rotations such that they form continuous patterns.
(a)
(b)
(c)
Figure 1: Patterns made from (a) random and (b) edge-matched Truchet Tiles and (c) random and (d) edge-matched Truchet-Smith tiles.
(d)
If edge patterns are symmetric and have the same internal segmentation, edges with that pattern will always connect to form a continuous pattern. This paper focuses on tiles that uphold the property of edge matching, and therefore pattern continuity, between all of their edges, regardless of rotation or placement. Specifically, we use squares and hexigons with ABA edges that are generalizations of the original Truchet Tile.
Snyder
Square Tile Set
The set of square tiles is made up of the generalized Truchet Tile set as described by Mitchell [5]. This is the set of tiles that can be constructed by placing two equidistant points on each edge and then connecting them with arcs and coloring the enclosed sections black and white. Figure 2 shows the six variations used in this paper along with their corresponding grayscale values as a fraction of the tile that is colored black.
Figure 2: (a) The square tile set and their corresponding darkness values, (b) a random tiling of this tile set.
Images Constructed from Square Tiles
A standard photo mosaic algorithm is used. To construct an image, we let our target image be a grid of cells, where cell has grayscale value , where 0 stands for black and 1 stands for white. For each cell , we assign it tile with brightness , such that the error is minimized. A random rotation is applied to each tile.
Figure 3: Detail of Da Vinci’s Mona Lisa rendered in square ABA tiles.
Hexagonal Tile Set
The hexagon tile set is made up of the simplest set of ABA hexagons described by Virolainen [8], constructed like the set of squares using only arcs and straight lines. Figure 4 shows the 28 tile variations along with their corresponding darkness values.
Rendering Grayscale Images with Square and Hexagonal Generalized Truchet Tiles
Figure 4: The tiles used to create the square-tile mozaic and their corresponding darkness values.
Images Constructed from Hexagonal Tiles
We construct our image following the same algorithm as we used for the square tiles. The hexagons have edge length and inradius . Hexagons in the same column are offset by while hexagons in the same row are offset by . This causes a stretching effect by a factor of . Additionally, the tiling structure makes it so that horizontally adjacent pixels are offset vertically by a distance of . However, despite both these factors, images are still discernible, albeit distorted.
Figure 5: Johannes Vermeer’s Girl with a Pearl Earring rendered in hexagonal ABA tiles.
Conclusions
There are many further research directions to explore. This principle of ABA tiles with varying internal darkness could also be extended to Archimedean, non-edge-to-edge, and other single-shape tilings, though this would introduce new problems around how to represent an underlying square grid with non-square tiles. This could likely be done by using a higher resolution image and taking the average gray value within the
region that underlies a given tile shape. Multiscale tiles could also be used. This has already been done with squares [4]**[1], but could likely be done with other polygons as well.
A wider range of tiles could be constructed with alternating ABA-BAB edges, with asymmetric edges, some solid A or solid B edges, or with a mix of ABA and ABABA or ABCBA edges. Many of these directions would introduce edge matching constraints that would make reaching an optimal solution more computationally complex, but which could add a greater range of gray values and more visual interest.
The current implementation does not exploit any special properties of Truchet Tiles that are not generically true of any other image tile besides the edge matching property. In the future, specific properties of Truchet Tiles such as the formation of closed curves could be explored. For example, an image could be turned into a set of curves which the tiles must trace out.
Since both methods of mosaic construction involve choosing a closest gray value for each cell out of a limited set, the appearance of the final images can be somewhat posterized. Because the tiles are weighted towards the middle of the darkness spectrum, the mosaics also have large uniform areas of the lightest and darkest colors, neither of which is a tile that varies with rotation. To correct for the posterization effect, we explored using Floyd-Steinberg dithering, an error diffusion technique for rendering images with a limited number of colors available. To reduce clustering of same tile types, a Gaussian weighting function was used. Neither of these yielded noticeably better results, but images illustrating these attempts are included in the supplement. In future work, a constraint could be implemented that limits the number of times a single tile can be used, such as in Bosch’s domino mosaic [3], but that was beyond the scope of this paper.
ABA tiles with varying internal darkness make a great building block for mosaic artwork representing target images. Since the interior of the tiles does not affect the pattern continuity property, the possibilities for internal patterns are essentially limitless. Due to the pure black-and-white nature of the tile design, this image rendering style is ideal for naturally binary processes such as two-color knitting [9], laser cutting, or printmaking. This method of constructing images could serve as a foundation for many other representation styles.
References
- [1] N. Batchelder. Truchet Images. https://nedbatchelder.com/blog/202208/truchet_images.html.
- [2] R. Bosch. “Opt Art: Special Cases.” Bridges Conference Proceedings. Coimbra, Portugal, 2011. pp. 249–256. http://archive.bridgesmathart.org/2011/bridges2011-249.html.
- [3] R. Bosch. Opt Art: From Mathematical Optimization to Visual Design.Princeton University Press, 2019.
- [4] C. Carlson. “Multi-Scale Truchet Patterns.” Bridges Conference Proceedings. Stockholm, Sweden, ul. 25–29, 2018. pp. 39–44. https://archive.bridgesmathart.org/2018/bridges2018-39.html.
- [5] K. Mitchell. “Generalizations of Truchet Tiles.” Bridges Conference Proceedings. (virtual), Aug. 1–5, 2020. pp. 191–198. http://archive.bridgesmathart.org/2020/bridges2020-191.html.
- [6] C. S. Smith and P. Boucher. “The Tiling Patterns of Sébastien Truchet and the Topology of Structural Hierarchy.” Leonardo, vol. 20, no. 4, 1987, pp. 373–385.
- [7] S. Truchet. “Memoire sur les Combinaisons.” Histoire de l’Académie Royale des Sciences, 1704, pp. 363–373 and plates 12–20.
- [8] S. Virolainen. “Random Hexagons and Other Patterns Continuities.” XX Generative Art Conference Proceedings. Ravenna, Italy, Dec. 13–15, 2017. pp. 331–352. http://www.artscience-ebookshop.com/ebooks_free/GA2017_proceedings_ebook.pdf.
- [9] A. E. Wendt. “Pattern Gradients with Generalized Duotone Truchet Tiles.” Bridges Conference Proceedings. Halifax, Nova Scotia, Canada, 2023. pp. 461–464. https://archive.bridgesmathart.org/2023/bridges2023-461.html.