Sierpinski Gasket Approximations and Ternary Colorings

Year: 2025 Authors: Tara Taylor

Core claim

A ternary-string ordering derived from Sierpinski arrowhead curves enables systematic CMY coloring of Sierpinski gasket approximations.

Topics

fractal approximation, ternary strings, color sequences, Sierpinski arrowhead curves, IFS

Domains

fractals, iterated function systems, combinatorics, recursive sequences, color theory, visualization, quilt design, generative art

Methods

iterated function system, address encoding, ordering rule, CMY mapping

Media

triangle approximations, colored images, CMY color model, quilt patterns

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 2025 Conference Proceedings

Sierpinski Gasket Approximations and Ternary Colorings

Tara Taylor

Department of Mathematics and Statistics, St. Francis Xavier University, Antigonish, Nova Scotia, Canada; ttaylor@stfx.ca

Abstract

This paper presents a way to connect approximations of the Sierpinski gasket with colorings of ternary strings. One way to model the gasket is with an iterated function system (IFS) that consists of three contractive mappings. An approximation is obtained by applying the contractive maps a finite numbers of times to some initial object. The gasket is the limit of these approximations. A finite address in the form of a ternary string corresponds to a finite composition of the contractive mappings. The Sierpinski arrowhead curve is another model for the gasket, and we can use it to provide an ordering of ternary strings that is different from the standard ordering. We present a way to associate a ternary string with a color from the CMY color model. Colored approximations can be used to create Sierpinski color sequences.

Approximations of the Sierpinski Gasket

The Sierpinski gasket is a well-known fractal whose boundary is a triangle (either equilateral or right isosceles) [6,8,11]. This paper focuses on the right triangle version. We can describe the gasket as illustrated by Figure 1. Start with a filled in triangle as the initiator. Join the midpoints of each side with line segments to divide the triangle into 4 similar triangles. The generator consists of three filled in triangles (leaving the center triangle empty). Repeat this process ad infinitum to obtain the Sierpinski gasket.

img-0.jpeg Figure 1: Initiator, generator, and approximations leading to the Sierpinski gasket.

There are different ways to mathematically model the gasket. One method is to use an iterated function system (IFS) [2,10]. An iterated function system (IFS) is a collection where each is a contractive mapping from the plane to itself. An IFS has a unique attractor that is made of smaller versions of itself: [2]. Starting with any compact set , form a sequence of approximations , for , as follows. and for :

The limit of the approximations as is [2]. is often chosen to encompass the attractor.

Let be the triangular region of the plane consisting of the triangle with vertices , , and along with the interior of this triangle. Let be the contractive mappings defined on the plane by

We refer to the set of these maps as the Sierpinski IFS. Figures 2(a) and 2(b) display along with , and . is the level approximation, with and

Taylor

for . Each consists of triangular regions whose sides have lengths . For a given level , each triangular region is of the form , where each . We can thus identify the triangular region in terms of an address . Figures 2(c) and 2(d) display and , while Figure 3 displays (along with the corresponding addresses of the triangular regions).

img-1.jpeg (a)

img-2.jpeg (b)

img-3.jpeg (c)

img-4.jpeg (d)

img-5.jpeg Figure 2: (a) Triangular region , (b) images of under 3 contractive mappings of Sierpinski IFS, (c) Sierpinski approximation with addresses of triangular regions, (d) Sierpinski approximation with addresses of triangular regions. Figure 3: Sierpinski approximation along with addresses of triangular regions.

Another way to model the Sierpinski gasket are the Sierpinski arrowhead curves [1,4,11]. Figure 4 shows the first five arrowhead curves for the equilateral triangle version of the gasket. The limit of the curves is the gasket. Figure 5 shows the Sierpinski arrowhead curves on three Sierpinski approximations.

img-6.jpeg Figure 4: Evolution of Sierpinski arrowhead curves (image attributed to Robert Dickau [4]).

Sierpinski Gasket Approximations and Ternary Colorings

img-7.jpeg Figure 5: Sierpinski arrowhead curves on Sierpinski approximations and .

img-8.jpeg

img-9.jpeg

Sierpinski Arrowhead Ordering

The Sierpinski arrowhead curves are paths between and . For a given level , the curve gives a way to order the ternary strings of length . This ordering is different from the standard ordering. Table 1 displays the orderings for levels 1, 2, and 3. The ternary strings come in blocks of 3 strings where the digits are all the same, and the digit can be 0, 1, or 2. Let B denote the digits for a given block. For the standard ordering, blocks of three strings split into three blocks of three strings that all have the same order for the final digits (namely 0, 1, 2):

Table 1: Orderings of Ternary Strings

LevelStandard OrderSierpinski Arrowhead Order
10, 1, 20, 1, 2
200, 01, 02, 10, 11, 12, 20, 21, 2200, 02, 01, 10, 11, 12, 21, 20, 22
3000, 001, 002, 010, 011, 012, 020, 021, 022, 100, 101, 102, 110, 111, 112, 120, 121, 122, 200, 201, 202, 210, 211, 212, 220, 221, 222000, 001, 002, 020, 022, 021, 012, 010, 011, 100, 102, 101, 110, 111, 112, 121, 120, 122, 211, 212, 210, 201, 200, 202, 220, 221, 222

For the Sierpinski arrowhead ordering, one can identify the pattern for how to get the ordering of the next level of ternary strings from the previous level. Observe what happens as we go from level 1 to level 2. The first three strings of length 2 all start with 0, the next three all start with 1, and the last three all start with 2. The last digits of the first three strings are in the order 0, 2, 1. The last digits of the middle three strings are in the order 0, 1, 2 (same as the order for length 1). The last digits of the final three strings of level 2 are in the order 1, 0, 2. In general, this pattern continues. Let denote the elements 0,1,2 in some order. A block of three strings splits into three blocks of three strings as follows.

The first block of three permutes the last digit of its parent block by switching the second and third and keeping the first the same, the middle block keeps the same order, and the last block switches the first and second and keeps the third the same. For example, to go from level 3 to level 4, the first block of three strings has and :

The next block has and :

Taylor

Is there a way to visualize how the Sierpinski arrowhead ordering is different from the standard ordering? The strings are ternary so one way is to associate each string with a color somehow.

Converting Ternary Strings to Colors in CMY Model

This paper uses the CMY color model [3,9]. In this color model, a color is specified by a CMY vector of the form , where the components of the vector are non-negative integers between 0 and 255. There are three strings of length 1. This paper follows the choice of associating magenta (M) with 0, yellow (Y) with 1, and cyan (C) with 2. This choice is a personal choice based on my own experimentation with different color models and color choices. In particular, I liked the CMY model compared to the RGB model because the colors seem softer and brighter to me. My son often complains that I wear only black so this was perhaps my way of brightening up.

To develop a method of converting a ternary string to a color, there are a few conditions we want to satisfy. The string of all 0s is M, the string of all 1s is Y, and the string of all 2s is C. For a given level , the ternary strings should correspond to distinct colors. A ternary string of length of the form , where each , corresponds to a color vector in the CMY model as follows. We first convert the ternary string to a vector with three binary strings of length . These vectors are of the form where for :

Note that for a given , exactly one value of or equals one, the others are all 0. The binary sum of the three binary strings is the binary string of all 1s:

For a given , the binary string of all 1s converted to decimal is . We define the unit color amount to be the floor of 255 divided by (we need an integer value for the CMY vectors and we can’t have values over 255 so the floor gives the greatest integer value less than or equal to the fraction).

Thus the color is found from the ternary string by first finding the three binary components, converting each of the binary components to decimal, and then multiplying by the unit color amount:

For example, consider the length 3 string 012. The unit color amount for level 3 is 36.

Table 2 presents the conversion details for length 1 and Table 3 has length 2. We can compare the orderings with colored number lines. For strings of length 1, the orderings are the same (see Figure 6). Figures 7 and 8 display the colored number lines for length 2 and Figure 9 displays length 3.

Table 2: Ternary Conversion for Level 1.

Ternary stringBinary VectorCMY VectorColor
0(0,1,0)(0,255,0)
1(0,0,1)(0,0,255)
2(1,0,0)(255,0,0)

Table 3: Ternary Conversion for Level 2.

Ternary stringBinary VectorCMY VectorColor
00(00,11,00)(0,255,0)
01(00,10,01)(0,170,85)
02(01,10,00)(85,170,0)
10(00,01,10)(0,85,170)
11(00,00,11)(0,0,255)
12(01,00,10)(85,0,170)
20(10,01,00)(170,85,0)
21(10,00,01)(170,0,85)
22(11,00,00)(255,0,0)

Sierpinski Gasket Approximations and Ternary Colorings

img-10.jpeg Figure 6: Standard and Sierpinski arrowhead ordering of ternary strings of length 1.

img-11.jpeg Figure 7: Standard ordering of ternary strings of length 2. Figure 8: Sierpinski arrowhead ordering of ternary strings of length 2.

img-12.jpeg Figure 9: Standard (top) and Sierpinski arrowhead (bottom) ordering of ternary strings of length 3.

The colored number lines are a visual way to compare the orderings. Consider length 2. In the standard order, 10 follows 02. The color jumps from (85,170,0) to (0,85,170) while in the Sierpinski arrowhead order, 10 follows 01 so the color jumps from (0,170,85) to (0,85,170). This jump feels more jarring in the standard ordering. By level 3, the colors flow more smoothly in the Sierpinski arrowhead ordering compared to the standard ordering. One could argue that the Sierpinski arrowhead ordering is more aesthetically pleasing because of how the colors change more consistently.

We can quantify the change in colors as follows. Given two CMY vectors, define the difference :

The jump from 02 to 10 in the standard order has while the jump from 01 to 10 has . In general, at a given , the biggest change occurs going from the string 02 … 2 to 10 … 0 (or 12 … 2 to 20 … 0) with

The minimum change occurs going from 0 … 00 to 0 … 01 with . It is possible to get a change of for . In contrast, with the Sierpinski arrowhead ordering the changes are all equal to . Going from one string to the next is either a change in the last digit or the last two digits are switched. In either case the overall net change is .

Sierpinski Color Sequences

Now that we have a way to associate a color with a ternary string, we can color the triangular regions of Sierpinski approximations according to their addresses. The Sierpinski arrowhead ordering shows how a path that starts from the lower left corner (the triangular region that includes the point ) moves through every triangular region of an approximation and ends at the lower right corner (the triangular region that includes the point ). The first two colored approximations (with addresses) of the Sierpinski gasket are displayed in Figures 10(a) and 10(b). Figure 10(c) displays a coloring of that uses the RGB model instead of the CMY. In the RGB coloring: 0 is associated with red, 1 with green, and 2 with blue. This image is included to help explain my preference for the CMY model. Figure 11 displays the colored approximations (with addresses) and (without addresses because the triangular regions are so small).

Taylor

img-13.jpeg (a)

img-14.jpeg (b)

img-15.jpeg (c)

img-16.jpeg Figure 10: (a), (b) Colored Sierpinski approximations (with addresses), (c) colored using RGB color model. Figure 11: Colored Sierpinski approximations (with addresses) and .

img-17.jpeg

Colored Sierpinski approximations can be used to create other objects. The arrangements into square tiles follow from previous work [14,15]. In the previous work, the tiles were created with the actual fractals while here we use colored approximations. A given arrangement is shown for the first three approximations from the sequence of approximations, hence I call them “Sierpinski Color Sequences”. I have chosen a small selection of arrangements that are appealing to me. It is interesting that we only need a few levels to appreciate the beauty of the colored approximations. Figure 12 displays an arrangement of eight triangles and the corresponding sequence. This arrangement possesses all eight symmetries of the square. See [15] for more details about the symmetries of the square.

img-18.jpeg

img-19.jpeg Figure 12: Sierpinski color sequence with all symmetries of the square.

img-20.jpeg

img-21.jpeg

Sierpinski Gasket Approximations and Ternary Colorings

Figure 13 displays an arrangement of eight triangles that has horizontal, vertical and rotational symmetries. Figure 14 displays an arrangement of two triangles that has one diagonal symmetry. Figure 15 displays an arrangement of four triangles that has rotational and both diagonal symmetries. Quilt makers will recognize elements of some standard quilt blocks in these arrangements: Figure 12 with the 8-Pointed Star, Figure 13 with Twelve Triangles, Figure 14 with the Sawtooth Square, and Figure 15 with the Square Upon Square [5]. See [7] for a wonderful paper on the mathematics of quilting. Of course we can go beyond squares to other objects. Figure 16 displays a sequence of pinwheels each made from eight approximations and a sequence of spirals also made from eight approximations.

img-22.jpeg Figure 13: Sierpinski color sequence with horizontal, vertical, and rotational symmetries.

img-23.jpeg Figure 14: Sierpinski color sequence with one diagonal symmetry.

img-24.jpeg Figure 15: Sierpinski color sequence with rotational and both diagonal symmetries.

img-25.jpeg Figure 16: Sierpinski color sequences of pinwheels and spirals.

Taylor

Summary and Conclusions

This paper has presented a way to color Sierpinski approximations that can be used to create beautiful images. The Sierpinski IFS consists of three contractive mappings, so approximations can be expressed in terms of addresses that are ternary strings. The initial idea for using color came from the realization that the Sierpinski arrowhead curves give an ordering to the ternary strings that is different from the standard ordering. The use of color helps to visualize how the ordering is different. Future work includes coloring of Sierpinski approximations for the equilateral triangle version of the gasket. While the colored approximation of the equilateral triangle version is just a linear transformation of the right triangle version (the addresses work the same way), one can use equilateral triangles for different kinds of tilings like hexagonal ones. Approximations of other fractals that are generated by IFS consisting of three maps could be colored using the same method. For example, coloring the approximations of the Sierpinski relatives [12,13] could produce some beautiful images and provide a way to understand the maps of the IFS. More concretely, the Sierpinski color approximations and sequences could be used in quilting.

Acknowledgements

Thank you to the reviewers for the positive feedback and helpful suggestions. St. Francis Xavier University has provided financial support for travel.

References

[1] Arrowhead applet. https://www.geogebra.org/m/fm8Q7pt2. [2] M. Barnsley. Fractals Everywhere. Academic Press, 2014. [3] D. Briggs. The Dimensions of Color. http://www.huevaluechroma.com/092.php. [4] R. Dickau. Sierpinski Arrowhead Curve. https://www.robertdickau.com/sierpinskiarrow.html. [5] P. Dobbs, M. Shimp, L. Sinkler, and R. Warehime. 100 Best Full-Size Quilt Blocks & Borders. Publications International, Ltd., 2006. [6] M. Frame and B. Mandelbrot. Fractals, Graphics, and Mathematics Education. Cambridge University Press, 2002. [7] K. Hebb. “The Mathematics of Quilting: A Quilter’s Tacit Knowledge of Symmetry, Tiling and Group Theory.” ISAMA-BRIDGES Conference Proceedings, Granada, Spain, 2003, pp. 511–520. [8] B. Mandelbrot. The Fractal Geometry of Nature. W. H. Freeman, 1982. [9] A. Peck. Color Manipulation, Channels, and Layer Modes. Beginning GIMP: From Novice to Professional. Springer, 2006, pp. 297-331. [10] H.O. Peitgen, H. Jürgens, D. Saupe, and M.J. Feigenbaum. Chaos and Fractals: New Frontiers of Science. Springer, 2004. [11] L. Riddle. Sierpinski Gasket. https://larryriddle.agnesscott.org/ifs/siertri/siertri.htm. [12] L. Riddle. 2022. Sierpinski Relatives. http://ecademy.agnesscott.edu/~lriddle/ifs/siertri/boxVariation.htm. [13] T. D. Taylor. “Connectivity Properties of Sierpinski Relatives.” Fractals, vol. 19, no. 4, 2011, pp. 481–506. [14] T. Taylor. “The Beauty of the Symmetric Sierpinski Relatives.” Bridges Conference Proceedings, Stockholm, Sweden, July 25-29, 2018, pp. 163-170. [15] T. Taylor. “Using Triangle Sierpinski Relatives to Visualize Subgroups of the Symmetries of the Square.” Bridges Conference Proceedings, Halifax, Canada, July 27-31, 2023, pp. 141-148.

0 items under this folder.