Compound Transformations

A compound translation is a transformation that encapsulates a sequence of transformations so that when the compound transformation is applied to an object the entire sequence of constituent transformations are applied and the new object is displayed.

To illustrate this, consider the figure below. We have a point ("center") and a circle C that we wish to rotate and dilate about the center point.  Assume that we have already set C as a center (choose "Center" from the "Mark" menu) and that we have already defined a custom rotation of 30 degrees and a custom dilation of 2/3.  Then, when we select C the rotate and dilate buttons will become active and if we hit the rotate button followed by the dilate button, we will get the figure shown.

compound 1

Perhaps we want a single transformation that does both the rotation and dilation at one time, without the construction of the intermediate circle.   To define such a compound transformation, we choose "Compound..." under the "Custom" menu.  A dialog box like that shown will pop up.   In the upper half of this dialog box there are two lists. The list on the left, labeled ``Currently Transforms:'' contains all of the transformations that have been carried out so far, in our case the rotation and dilation. The list on the right, labeled ``Compound Transforms:'' will contain the transforms that we wish to sequence into a new compound transformation. To define this new transformation we click on the transforms in the left list that we wish to be included.

compound panel

To define a new compound transformation click on the Rotation item and then the Dilation item to add these to the new compound transformation.  Then, name the new transformation "spiral" and hit okay.

Now, let's go back to the Canvas and click on the small dilated circle.  Under the "Custom" menu we now see our new compound transformation "spiral".  Choose this menu item.  The circle will automatically be rotated AND dilated as shown.

compound 2

Deterministic vs Random Transformations:

The three checkboxes in the middle of the Compund Transform dialog box, the ones labeled "Deterministic Transform", "Random Transform", and "IFS Replacement Transform" are used to create special types of compound transforms.

Deterministic: If we check the box labeled "Deterministic Transform" when creating a compound transform, the component transforms will be carried out in sequence. This is the default setting for the dialog box. See the example above for details.

Random: If we check the box labeled "Random Transform" when creating a compound transform, the component transforms of the compound transform will be randomly applied.  For example, in the example above, suppose we selected the rotation and dilation, but checked the "Random Transform" box.  When we click "Okay" another dialog box will pop up asking us what probabilities of occurrence we should set with each transform.

stats transform panel

Here we have set each component transform to take place with a probability of 0.5.  The two checkboxes in this dialog, labeled "Fixed update:" and "Random Update:"  can be used to define two types of action for the new transformation. In the first case, one of the compenent transforms will be chosen at random, and will be thereafter fixed. In the second case, each time the screen refreshes one of the component transformations will be used to create a new object.  In this example, we'll stay with the default choice - "Fixed update:"

Now, suppose we take a circle and apply this new randomized transformation.  Each time we apply it, we get a rotated or dilated circle, with probaility 0.5.  Here are some iterates of this process. We started with circle C'.


compound 3

IFS Replacement Transform: If we check the box labeled "IFS Replacement Transform" when creating a compound transform, we can create a system of transforms that can be automatically iterated on a figure.

For example, suppose we create triangle ABC and create a point D inside this triangle. Then, we define three dilations, one with center at A and custom dilation scale factor of 1.2, one with center at B and custom dilation scale factor of 1.2, and one with center at C and custom dilation scale factor of 1.2.  Apply each of the three transformations to D, yielding points E, F, and G as shown.

compund IFS

At this point, we define a compound transform from these three dilations. Choose "Compound..." under the Custom menu, select the transformations, name the new transform IFS, and check the "IFS Replacement Transform" box, as shown.

ifs panel

To use this new transformation, first select point D. This will be the base point that we will iterate the three transformations upon.  Then, choose "Iterated..." under the Custom menu.  A dialog box will popup.  We will use this box to define the recursion level for our transformation.  The recursion level is the number of times the IFS transformation is applied to an object.  The transformation proceeds by recursive replacement of geometric objects at each level. For example, the first time the IFS is applied, each of the three dilations will be applied to D, yielding three new points which replace D - that is, D no longer exists.  The next time the IFS is applied, each of the three dilations is applied to each of the three new points, yielding nine points at level 2 of the recursion that replace the three level 1 points. At level 3, we would get 27 points, at level 4 we would get 81 points, and so on.  The recursive procedure generated in this fashion grows very fast, so be careful when setting the level. We will set it to 4.

iterate panel

We see the result of 4 iterations here.  The set of points generated looks a lot like a famous fractal - the Sierpinski's Gasket.
compound IFS 2


If we go too many more levels deep, the program may run out of memory.  For this reason, there is an option to iterate the IFS without creating new interactive points, we just draw the points as a graphic image.  To see how to do this, select one of the points in the figure and choose "Iterate..." again from the Custom menu.  This time click the radio button labeled "Flatten Points." Put in an Iteration number of 7 and hit Okay. (You may have to wait some time for the program to draw all of the points)  You'll get a mass of points. To make the image more easily visible, change the size of points using the Preferences submenu under the Edit menu.

compound 3