The following table shows the result of combining one transformation with another. The one down the rows is done first, followed by the one across the columns. If we call the transformations Tn for n = 1, 2, 3, 4, 5, 6, 7, 8 then the table shows the result of the composition Tc•Tr, where r and c denote row and column.
\[\begin{array}{*{20}{c}} {} & {\begin{array}{*{20}{c}} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \end{array} } \\ {\begin{array}{*{20}{c}} 1 \\ 2 \\ 3 \\ 4 \\ 5 \\ 6 \\ 7 \\ 8 \\ \end{array} } & {\boxed{\begin{array}{*{20}{c}} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ 2 & 3 & 4 & 1 & 8 & 7 & 5 & 6\\ 3 & 4 & 1 & 2 & 6 & 5 & 8 & 7\\ 4 & 1 & 2 & 3 & 7 & 8 & 6 & 5\\ 5 & 7 & 6 & 8 & 1 & 3 & 2 & 4\\ 6 & 8 & 5 & 7 & 3 & 1 & 4 & 2\\ 7 & 6 & 8 & 5 & 4 & 2 & 1 & 3\\ 8 & 5 & 7 & 6 & 2 & 4 & 3 & 1\\ \end{array} }} \\ \end{array} \]So, for example, applying a reflection across the lower left to upper right diagonal (#7) followed by a rotation by 270° (#4) is the same as doing a vertical reflection (#5), as illustrated below. Hence T5 = T4•T7.
In fact, you only need transformations 2 (rotation by 90°) and 5 (vertical reflection across a horizontal line) to generate the non-identity transformations:
T2 = T2
T3 = (T2)2
T4 = (T2)3
T5 = T5
T7 = T2•T5
T6 = (T2)2•T5
T8 = (T2)3•T5
The first function (top left) must scale by 1/2 and rotate by 180°. As the figure below shows, the square must also be translated 1/2 to the right and up by 1.
\[\begin{aligned}
{f_1}({\mathbf{x}}) &= \left[ {\begin{array}{*{20}{c}}
{\cos {{(180)}^ \circ }} & { - \sin {{(180)}^ \circ }} \\
{\sin {{(180)}^ \circ }} & {\cos {{(180)}^ \circ }} \\
\end{array} } \right]\left[ {\begin{array}{*{20}{c}}
{1/2} & 0 \\
0 & {1/2} \\
\end{array} } \right]{\mathbf{x}} + \left[ {\begin{array}{*{20}{c}}
{1/2} \\
{1} \\
\end{array} } \right] \\
&= \left[ {\begin{array}{*{20}{c}}
{ - 1/2} & {0} \\
{ 0} & { - 1/2} \\
\end{array} } \right]{\mathbf{x}} + \left[ {\begin{array}{*{20}{c}}
{1/2} \\
{1} \\
\end{array} } \right] \\
\end{aligned} \]
The second function (bottom left) must scale by 1/2, followed by a reflection across the vertical axis. As the figure below shows, this must then by followed by a translation by 1/2 to the right.
\[\begin{aligned}
{f_2}({\mathbf{x}}) &= \left[ {\begin{array}{*{20}{c}}
{ - 1} & 0 \\
0 & 1 \\
\end{array} } \right]\left[ {\begin{array}{*{20}{c}}
{1/2} & 0 \\
0 & {1/2} \\
\end{array} } \right]{\mathbf{x}} + \left[ {\begin{array}{*{20}{c}}
{1/2} \\
0 \\
\end{array} } \right] \\
&= \left[ {\begin{array}{*{20}{c}}
{-1/2} & {0} \\
{0} & { 1/2} \\
\end{array} } \right]{\mathbf{x}} + \left[ {\begin{array}{*{20}{c}}
{1/2} \\
0 \\
\end{array} } \right] \\
\end{aligned} \]
The third function (bottom right) must scale by 1/2, followed by a reflection across the horizontal axis. The square must then be translated by 1/2 to the right and 1/2 up.
\[\begin{aligned}
{f_3}({\mathbf{x}}) &= \left[ {\begin{array}{*{20}{c}}
{ 1} & {0} \\
0 & {-1} \\
\end{array} } \right]\left[ {\begin{array}{*{20}{c}}
{1/2} & 0 \\
0 & {1/2} \\
\end{array} } \right]{\mathbf{x}} + \left[ {\begin{array}{*{20}{c}}
{1/2} \\
{1/2} \\
\end{array} } \right] \\
&= \left[ {\begin{array}{*{20}{c}}
{1/2} & {0} \\
{0} & { -1/2} \\
\end{array} } \right]{\mathbf{x}} + \left[ {\begin{array}{*{20}{c}}
{1/2} \\
{1/2} \\
\end{array} } \right] \\
\end{aligned} \]
This IFS produces the following Sierpinski relative.
Watch an animated video of the construction of relative 365 using the transformations 3, 5, and 6 of the dihedral group.