Artful Computing

 

Transformation of Original Photographs

My original inspiration was indeed at attempt to follow some of the methods (using "rosette" functions) outlined in early chapters of Creating Symmetry: the Artful Mathematics of Wallpaper Patterns and now we are ready to actually do  the job.

The transformation formula used in this case is based on a polynomial expression, simple in terms of its complexity, complex in the technical sense of being a polynomial employing complex numbers. I have programmed an expression of the form:

z' = .... A-2/z2 + A-1/z + A0 + A1z + A2 z2 + A3z3......

where the .... dots mean "it goes on and on for as far as you like". In practice "as far as I like" involves no more than about 10 terms, and at any one time I would choose to make only at most three or four of the "An" values non-zero. This polynomial expression is analytic (except where it goes to infinity) so the transformation has some nice properties.   How do we use this? We iterate over the pixels in what is to be our output image and treat each pixel coordinate as the value of a complex number in the Argand plane. Now feed this number into the express above and use the output value of z to find a pixel in the original source photograph.

What do we do if the output of our transformation function goes outside the boundary of the source image? Frank Farris sets the pixel to black, which produces some striking results, throwing the generated "rosette" into the visual foreground. I set up my program to explore some alternative options. Most of the images on this web site extend the source image plane to infinity by repeated reflection the image in its boundary line. When we combine this with use of the 1/z powers can produce results in which the inside and the outside of the image are swapped over. (On the other hand, an artist friend of mine prefers some of the unpredictable linear patterns which are generated when I use the nearest boundary pixel.)

Warning! More advanced skippable maths stuff! It can be shown (this is mathematician-speak for "I can't be bothered to explain just now - but it's true.") that the right choices of the Ans can either create certain predictable over-riding symmetries in the output pattern, or not according to one's desires. (See "Creating Symmetry" for the mathematical details if you wish - but the "n" values all have to reduce to the same number when expressed as modulus-m, where m will define the symmetry observed in the final results). All that will not mean much to you unless you understand the mathematical terms, but as I have previously pointed out pattern and symmetry are built into maths at a very fundamental level sometimes in ways that are not easy to discuss in purely visual terms, so mathematicians have invented much more abstract ways of handling it. We can give visual interpretations to some of these ideas, but the abstract foundation is still there.  

Because the strict conformal properties are not absolutely essential to what I produce (as they are when one uses conformal maps to solve complex physics problems!) I have also experimented in variations of the expression (for example by dividing or multiplying the whole expression by |z|p where p is some value with which I can experiment). These variations can produce useful modifications where transformation of parts of the image would otherwise become excessively large or small too quickly. Apologies to the mathematical purists - but I am motivated by the images which result rather than attempts to illustrate mathematical principles. 

From a purely artistic viewpoint, I find that I like to create a symmetrical image - and then do something else to break the visual symmetry, which I find becomes someone tedious if over-done. It is a matter of trying to tread that fine line between order and chaos. My transformation functions therefore allow a bit of the original source image to be added to the mix (by this I mean that Ao in the polynomial expression above may be non-zero.)

Some of the results are shown in the gallery "Complex Mapping Using Photographs as Sources" or some in the image slider below.

Images from Complex Maps - click on image to see at full resolution. (But be warned! These images do not compress very well as JPEGs, so file sizes can be 5 or 6 Megabytes!)

This link will let you view and download a program that performs similar photographic manipulations. (It differs from the program used to produce some of the Gallery images in that instead of powers of (1/z) it uses powers of the complex conjugate of z. This is slightly better behaved than 1/z functions because there are no outrageous infinities to deal with, though it does create somewhat different effects when the conjugates are added into the mix. Nor do these functions strictly preserve the "conformal" property - but whatever produces and interesting image is OK by me. (You can take is as an exercise for the reader to go back to using 1/z. It is a two-line change. You will have to read and understand the program to do this - which is the point of the whole exercise.) I choose to include this version of the program because it includes a number of useful features to provide more control over the transformation that go beyond those in the earlier strictly conformal transformations.

One of the new features save a "csv" file describing the parameters used to generate the image. This file can be "replayed" to regenerate exactly the same image - which you might choose to compute at a higher resolution having found something that particularly pleases. The new program version can also automatically play through a sequence of transformations in which control parameters vary slightly through time. I have experimented with using several hundred such images to produce a video. (The open source utility ffmpeg will stitch still images into a video.) See my description of producing video clips