| IFS Transformations | |||||||
|
|||||||
|
An example self-similar image is shown below. If you look closely, you will see that each element of the main image is in fact a smaller rotated copy of the entire image! For the curious, the images used in this document are in a compressed interlaced GIF 89a format with transparency information.
The whole point of IFS compression is this: If we know what the whole image looks like, we can apply a very simple transformation to produce the embedded copy. These transformations are known as affine. This is the technical term to denote a transformation that only includes scaling, rotation, translation and skewing (also note that different parts of the image can be rotated by different amounts!). If our examples, we will only use 'normal' rotations and ignore skewing. To demonstrate this, the transformation required to map the entire image into the copy at the end of the tail is shown below. This transformation is broken down into its component parts so you can see exactly what is involved and how conceptually simple the transformations are. The first thing that must be done is a scaling. This reduces the original image to the size of the copy we wish to produce. In this case, we scale the original to 20% of it's size. The original image is shown in blue for reference.
Next, the image must be rotated so that it lines up with the destination copy. In this case, we must rotate it 135 degrees anti-clockwise.
Finally, we must translate the image so that it exactly overlays the destination copy. Assuming that the co-ordinates of the bottom left of the main image are (-250, -250) and the image is 500x500 in size, then the translation is (125, -75).
We can also specify a similar transformation to map the main image into a copy that includes everything but the last sub-copy in the tail. Notice that this copy also includes many further sub-copies. The exact transformation is: scale to 0.9 of the original size, rotate 20 degrees anti-clockwise and translate (25, 25). The result is shown below.
The effect of applying the two transformations to a border drawn around the outside of the above pictures is shown below. The first described transformations produces the blue box and the second transformation the green box. Knowing the position of the transformed position of the entire image is an important concept for the death algorithm below. One should be aware that any pixel within the image is transformed to some pixel within one of these smaller rectangles. Also note that all pixels from the original image are contained within the boundary of the main image.
|