Collage theorem to generate a spiral

940 Views Asked by At

I need to answer a question on fractals from the book Fractals Everywhere by M. Barsley and I have been struggling with it for a while:

Use collage theorem to help you find an IFS consisting of two affine maps in $\mathbb{R}^2$ whose attractor is close to this set: enter image description here

It would be great to have some hints/help - I feel like it should be really simple but I'm having a hard tome to wrap my head around it. Thanks!

2

There are 2 best solutions below

2
On BEST ANSWER

If you have Mathematica, you can generate a good approximation to the set like so:

Import["https://sites.google.com/a/unca.edu/mark-mcclure/IteratedFunctionSystems.m"]
IFS = {
  {{{0.980019, -0.153438}, {0.25526, 0.88033}}, {54.4695, -50.3965}},
  {{{-0.131103, -0.0796567}, {0.123349, -0.136077}}, {97.7113, 313.055}}
};
ShowIFSStochastic[IFS, 100000, Colors -> True, ImageSize -> 500]

enter image description here

Even if you don't have Mathematica, you should be able to read the IFS you seek right out of the code. The package represents an affine transformation $T:\mathbb R^2 \rightarrow \mathbb R^2$ given by $$T(x,y) = \left( \begin{array}{cc} a & b\\ c & d \end{array} \right)\left( \begin{array}{c} x \\ y \end{array}\right) +\left( \begin{array}{c} e \\ f \end{array}\right) $$ in the form

{ {{a,b},{c,d}}, {e,f} }

and you can see two such transformations in the code.

The idea behind the collage theorem is to find transformations that map the whole image onto the two, colored sub-parts. You can automate the procedure by mapping key points in the whole to the corresponding key points in the sub-part. To map onto the red sub-portion, for example, you might consider the following picture:

enter image description here

The arrows indicate how certain key points in the whole map to their corresponding key point in the red sub-part. The central dot in the middle of the red spiral is fixed. Since we know the function has a particular form dependent on the parameters {a,b,c,d,e,f}, we can use a least squares procedure to find a very good approximation to the function. That is, for each pair consisting of a key point $(x_1,y_1)$ and its known image $(x_2,y_2)$, we form the squared norm $$\|T(x_1,y_1)-(x_2,y_2)\|^2 = \left\|\left( \begin{array}{cc} a & b\\ c & d \end{array} \right)\left( \begin{array}{c} x_1 \\ y_1 \end{array}\right) +\left( \begin{array}{c} e \\ f \end{array}\right) - \left( \begin{array}{c} x_2 \\ y_2 \end{array}\right) \right\|^2. $$ We then total these and minimize over the parameters {a,b,c,d,e,f} to obtain a function.

The other transformation can be estimated in similar fashion. There, we attempt to map the green key points in the following image to the red key points in the smaller figure as shown here:

enter image description here

The process should be pretty good. Here's the generated image overlayed on top of the original scanned image.

enter image description here

Could be better, actually but still, it's pretty good. I picked the points using a point and click tool that certainly had a little error.

0
On

The basic idea is to think of two affine mappings that each map the entire picture to a proper subset of itself. Instead of trying to match up the entire set of points, all you need to do is think about the placement of the vertices of the bounding box such that certain points are identified under the mapping.

What I mean by this is that, for example, one mapping clearly must identify the center of the spiral with itself, whilst slightly rotating the image counterclockwise and shrinking it slightly so that it identifies with the subset of the spiral that lacks the outermost "sub-spiral." To obtain an affine mapping that does this, try to solve the appropriate linear transformation equation that takes three corners of the bounding box to the (approximate) points where you'd expect those corners to go under this mapping.

The second mapping takes the entire spiral and maps it to one of the little sub-spirals, say, the outermost. Take care to note that this mapping translates, shears, rotates, and scales the large spiral. Again, you can eyeball it but the more precise you are, the closer the resulting image will be to the given picture.

The composition of these two mappings in an IFS will probabilistically generate the entire set, although you may need to tune the probabilities accordingly so that the density of points is not uneven.

Here is a link to an interactive demonstration that allows you to manipulate the affine mappings (as they are defined by their effect on the bounding box) in real-time to see how the IFS is generated:

http://demonstrations.wolfram.com/FractalCreationWithIteratedFunctionSystems/