My patterns, as with all the Complex Mapping examples, are generated by first selecting a photograph with a mix of colours and shapes that experience suggests will provide an interesting outcome. (Strong lines seems to work, and we all require a combination of matching colours with some accents.) We then encode each pixel location on the output - "target" - image as a complex number (that is treating the image as an Argand plane). This number is then fed into our complex mapping function, and the output from that, which is again a complex number, is used to find a location in the source image. The colour value from this pixel is then transferred to the target image.
In order to get output images with three-fold symmetry we need to devise a complex mapping function that produces the same output value for locations on our target image that are rotated 120º and 240º from each other. In order to get a repeating pattern we need to arrange that adding a displacement along each of three directions separated by 120º will again produce the same value. We can achieve all these by building our mapping function by adding representations of a wave train moving in each of the three directions. The repeating nature of the waves guarantees translational symmetry; the use of three wave trains guarantees the rotational symmetry.
In practice, in order to get visually interesting patterns, we need to use a combination of harmonics in our final mapping function, which amounts to the sum:
f(z) = ∑ An (exp(2πiy) + exp(2πi(√3x-y)/2) +exp(2πi(-√3x-y)/2))
(Note that the second term in the sum above is simply the first term multiplied by a complex number that rotates by 120º in the complex plane, while the third term is the second again multiplied by the same factor given a 240º rotation. A third multiplication wold take us back to the first term, hence this a complex cube root of 1.)
This is a restricted version of the recipe used in Creating Symmetry, one that guarantees mirror planes combine with the rotational symmetry. I will generalise the implementation in the Processing program to include formulae that provide rotational but not mirror symmetry.
The initial values of the An coefficients are all zero, except for Ao (the "zeroth" harmonic) which is 1. This means that on start-up we see the original source image which will be used as our colour map. We now have the possibility of reducing Ao to 0 as we increase the coefficients of other harmonics, achieving a smoothly varying transition between the results of different control parameters. I personally find that some of the most interesting results emerge when we allow a small component of the zeroth harmonic to break the perfect symmetry of the final images.
See this gallery for further examples along these lines. I am currently doing experiments with constructing videos where the sequence of frames represents a smoothly varying sequence of the image transformation parameters. (This began when a local artist, Val Olsen, who I had met in the Stroud Open Studios even looked at my website and became interested in applying some of my transformations to photographs of her work - and then said it would be nice to construct a slide show in which a few different examples faded from one to the other, and then I thought, why why stop at using a few dozen transformations, why not 600 or 700, or even a couple of thousand - its just an hour or so of computer time. Go for a walk! See an early experiment on YouTube.)