[image of digits]

Fractals & Strange Attractors - Borland C++ Builder 6 Applications

Langton's Ant - Version 3
Dave Niebuhr's implementation of Langton's Ant...

Mandelbrot Set:
From Wikipedia, the free encyclopedia: Work on the Mandelbrot set "coincided with a huge increase in interest in complex dynamics, and the study of the Mandelbrot set has been a centerpiece of this field ever since. It would be futile to attempt to make a list of all the mathematicians who have contributed to our understanding of this set since then..."

New Mandelbrot Explorer enhanced from Jeff Suer's
This application, contributed by Jeff Suer, allows the user to explore the Mandelbrot set by zooming in from a magnification of 1 to a magnification of 230 or over one billion power (1,073,741,824). That is 20 times the magnification of an electron microscope.

Zoom-and-Center, either in and out is accomplished by clicking the left or right mouse button respectively. Magnification and doublings (powers of 2) are shown in Edit boxes with each click. The user may choose from 5 different coloring schemes including a "contour" map based on coloring odds and evens either black or white.

Jeff Suer's Mandelbrot Explorer
This application, contributed by Jeff Suer, allows the user to explore the Mandelbrot set by zooming in from a magnification of 1 to a magnification of 230 or over one billion power (1,073,741,824). That is 20 times the magnification of an electron microscope.

The Lorenz Attractor:
From Wikipedia, the free encyclopedia: The Lorenz attractor is a chaotic map, noted for its butterfly shape. The map shows how the state of a dynamical system (the three variables of a three-dimensional system) evolves over time in a complex, non-repeating pattern, often described as beautiful. The attractor itself, and the equations from which it is derived, were introduced by Edward Lorenz in 1963, who derived it from the simplified equations of convection rolls arising in the equations of the atmosphere...

Also see Andrew Ho's pages on chaos and the Lorenz attractor...

Lorenz Attractor - 3 views
This application shows all three 3-dimensional planes and colors the points from black, through the cool and then warm colors, to white as the algorithm generates them from the first to the last iteration. The added dimension of color shows additional chaotic behavior that is obscured in a single color plot.

Lorenz Attractor - 1 view
This application shows only the YZ plane and colors the points from black, through the cool and then warm colors, to white as the algorithm generates them from the first to the last iteration. The added dimension of color shows additional chaotic behavior that is obscured in a single color plot.

Half Way There

The simulations below are all variations and enhancements on a simple theme. They represent an apocryphal story which goes something like this:

Once upon a time there was an indecisive nomadic family. They were always looking for a better life and set out to make their fortune in surrounding cities. The user can left-click on the screen to set the location of each of up to scores of cities, but try beginning with just three. The user can then right-click on the screen to set the location of that family's first camp. The family then follows a compulsive and seemingly random behavior: It picks one city at random and travels towards it. When it is half-way there, it tires and so stops and camps for the night. In the morning the family awakes, and being indecisive, selects another city as its goal. It travels half-way there and camps. Compulsively, it keeps selecting a city at random, travelling half-way there, and camping for the night.

The question is: "What sort of pattern is generated by the campsites it has left?" Can you figure this out in your head? Can you figure this out on paper? I have never met anyone who could accurately predict what will happen. One's usual intuition goes like this, "It's a random process, so the pattern should be random, right?" But usually no one will say that because they suspect the algorithm will produce counterintuitive results.

Try the white version below to understand how the story fits the simulation.
Then try the enhanced versions to set your own city and camp locations and explore the other variations...

Half Way There - Demonstration Version - 2007
A somewhat bare-bones version used to demonstrate the problem without necessarily revealing its solution.

Half Way There - April 2008 "C"
Some enhancements we may make on the second day of class.

Full-Size Screen Shots (the pattern clarifies after 1000 hits): cold-to-hot / hot-to-cold / faux-shadows

Half Way There - April 2008 "B"
As far as we got on the first day of class. We'll be enhancing this...

Half Way There - January 2008
Getting a bit fancy... Introducing Buttons, TrackBars, Edit, Panels, RadioGroups and PaintBox. Sleep has been changed to Maximum Iterations. There is a choice of displaying the iterations or not and a choice of tweak or not. The array may be rendered in three ways. The image to the left shows both the normal (+) version and the tweaked (-) version. The tweaked (-) version is run ten times (10x) more than the normal version to provide comparable shading.

Half Way - Start - What we did in class April 5, 2007
Not too fancy, but we added color visualization to the rendering. For this image, a dot was placed at each vertex of a triangle and one in the center. Later, three more dots were added to the center of each of the three large inverted black triangles.

Half Way There - Sonified
A modification in which the RENDER function automatically scales the color ramp to accommodate the full range of the data. The display is also sonified. By right clicking on any row of the image, that row will be scanned and the data values automatically scaled to accommodate the full range of the MIDI keyboard. The speed of the scan, and thus the speed of the sonification, are user adjustable. The cursor position and the maximum value of the array (used for automatic scaling) are also shown.

Regular Polygons (Bent)
Here we bent the rules, following a suggestion in class to change the "-"s in the algorithm to "+"s. Additionally, we included the option of an extra point at the center of the polygon, suggested by a "bug" in the "user defined polygons" applications below. This now produces quite a variety of fractal images.

A Simple Tale: "Half Way There."
A quick simulation you can write at a single sitting. An indecisive family sets out every morning for a city which they believe will make them rich. When they are half-way-there they camp for the night. The next morning they change their minds about which city is the best to travel to. They travel half-way there an camp. Next morning... The user left-clicks the mouse to set the locations of the cities and then right-clicks to set the location of the first camp. Pressing "RUN" takes the family through 100,000 days and nights...

User Defined Polygons
A further modification allowing the user to define the shape of the polygon.

Jeff's Polygon
A modification of the application above by Jeff Shih who extended the process to polygons of many sides, by Dave Niebuhr who helped debug it, and by Nick Gessler who added the coloring algorithms. A slider bar allows you to enhance the detail of the algorithm.

Triangle - New
A demonstration of emergence from simple rules to complex global behavior which produces Sierpinski's gasket. A simple rule repeated thousands of times produces unexpected results. Modified from the application above.

 

Triangle
A demonstration of emergence from simple rules to complex global behavior which produces Sierpinski's gasket. A simple rule repeated thousands of times produces unexpected results.

Open Graphic Language (OGL) - Globe
In this application, from the C++ BUILDER 6 IDE, the objects rotatate automatically until any key is pressed, whereupon the application will close.

Executable

Open Graphic Language (OGL) - Ring
In this application, from the C++ BUILDER 6 IDE, the objects may be rotated by the arrow keys. The red, gold and blue .bmp files are used to wrap the objects. Save them in the same folder with the executable before running the application.

Executable
Source Code
Project and .bmp Files Zipped

red.bmp
blue.bmp
gold.bmp


See what you can figure out about the code. Try changing it! Replace the .bmp files with your favorite photos. Here are a couple of different .bmp files: grid.bmp rummy.bmp