Motion-Controlled Iterated Function System Visualization
MAT251 - Motion Sensing Interactive Installation Design, instructed by George Legrady.
introduction
This project is a motion-controlled visualization of iterated function systems, a type of self-similar fractal structure (see below for further details). Since fractals are usually presented as static imagery and generated using non-intuitive mathematics (at least to a non-mathematician), I thought it would be interesting to give the viewer/user control of the visualization parameters using a simple and intuitive interface. In this project, the user's motion in the floor space in front of the projected visualization is tracked by a camera and used to control the parameters of the fractal structure in real-time.
Figure 1 - Installation Overview
implementation notes
The project visualization was implemented in Macromedia Director, and used Smoothware's TrackThemColors extra for camera tracking.
To enable easy configuration and extensibility, I abstracted an iterated function system as three parent script objects in Director: IFS, Transform, and vec (i.e. vector). An IFS object contains a collection of Transforms, and each Transform is defined by three vec objects representing its X axis, Y axis, and center point. Each object possesses utility functions that hide much of the mathematics used.
To allow the user to have influence over multiple transforms in the IFS, I decided upon a scheme wherein the user's position is directly mapped to one transform, which the remaining transforms slowly orbit around.
Figures 2, 3, 4 - Output of project using different IFS (click image to enlarge)
Click here to view a demonstration of the visualization (requires Macromedia Shockwave).
Thanks go to Andreas Schlegel for his assistance with integrating camera-tracking into this project.
appendix: iterated function systems
An iterated function system (IFS) can be defined as an attractor formed by the union of a finite number of contraction mappings. This project uses a type of contraction mapping known as an affine transform, wherein each transform in the IFS is a scaled, translated, sheared, and/or rotated image of the entire IFS. Since this 'self-transformation' occurs an infinite number of times, the IFS possesses a very complex, self-similar structure. The amazing quality of an IFS is that it can be defined precisely using a very small number of parameters.
Figure 5 - Simulated generation of IFS with three affine transforms (scale + translation)
To generate an image of the IFS, a random-iteration algorithm can be used. Since an IFS is an attractor, if a point is repetitively transformed by randomly-chosen transforms in the IFS, the point will gravitate toward only those points in the IFS. If the point is plotted after each random transformation, an image of the IFS' structure will quickly coalesce.
references and links
Donald M. Davis, 'The Nature and Power of Mathematics' - Princeton, 1993
David Peak & Michael Frame, 'Chaos Under Control - The Art and Science of Complexity' - Freeman & Co., 1994
Michael F. Barnsley, 'Fractals Everywhere' - Academic Press, 1993
Macromedia
Smoothware