[image of digits]

3D Anaglyphs - Borland C++ Builder 6 Applications
Best viewed with RED / CYAN glasses.
Other methods of 3D visualization
3D Journal

Evolutionary Computing - The Traveling Ferenghi Problem
a.k.a. Traveling Salesman Problem

Your are given the task of visiting up to 30 cities. Having limited time and resources, you want to make the trip in as short a distance as possible, returning home when you are finished. Consequently, you must visit every city, and each city only once. Evolution, "the blind watchmaker," generally finds reasonably good solutions in seconds. More complex rules may be found on our "Evolution" page. This version was simplified in order to explore 3D rendering.

Evolutionary Concert Tour (ECT) with 3D Anaglyph Enhancement
Version G - 2 November 2008 - (derived directly from version F)
Converting the 2D application to 3D required no change to the basic evolutionary algorithm. A "z" dimension was added to the the city[] array and the distance computation was changed accordingly. Consequently city values range from 0 to 100 in each of three dimensions. Fogel's cities and Random cities select the "z" dimension randomly.

The "Yours" city placement button allows you to choose the "z" component before you MouseDown on the PaintBox. Once you click this button, a SetFocus() command returns focus to the "z" TrackBar which allows you to either move the cursor with the wheel or to move the cursor with the mouse. The detents on the wheel have a value of 1 (on my mouse). It is possible to draw points which progressively sink into, or out of, the screen by rolling the mouse wheel about 3 detents between MouseDowns. (Thirty points at three detents each give a total depth of about 90.)

To correctly color an anaglyph, when cyan overlays red the result should be rendered in black on a white background. Or rendered in white on a black background. This could be done by drawing the cyan and red lines as points onto another array where each cell can be checked for that overlay and red or cyan, black or white, entered depending on the previous value. Reducing the lines to points in order to accomplish this would require substantial modification. Consequently, this version uses PaintBox->LineTo() commands which draw red lines over the top of cyan lines and cyan lines over the top of red lines instead of combining them to yield black or white. As a result of this heuristic, lines with little separation, specifically horizontal lines, will appear anomalous.

The user may also select the background. Note that with a white background, the rendering appears below the screen while with a black background the rendering is reversed and appears above the screen.


Some hand-built city files:


xxxxxxxxx
ect-3d-cone.txtxxxxxxxxxxxxxxxxxxxxxxect-3d-cone.txtxxxxxxxxxxxxxxxxxxxxxx ect-3d-cylinder.txt

xxx
ect-3d-warp.txtxxxxxxxxxxxxxxxxxxxxxxect-3d-knot.txt

Half Way There
a.k.a. The Chaos Game

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 many 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, 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:
"What sort of pattern is generated by the campsites that it left?

Half Way There - 3D -int world[400][400][400] - January 2010
A 3D anaglyph requiring red/cyan glasses. The world is 400 cubed, a Boolean array, containing 64,000,000 cells and occupying 64,000,000 bytes of memory. In placing points (cities) on the map, use the TrackBar to give the location depth. A depth of 0 pops out at you; a depth of 400 is behind the plane of the display. The configuration of points (cities) can be written to and read from a text (.txt) file with the Open and Save buttons. When selecting the tweaked version of the code, please make sure to keep the distribution of cities relatively small. Otherwise the points may grow out-of-bounds and crash the application. At the end of each Run, the total number of cells occupied in the world is given, as well as the percentage. The Red/Cyan color separation can also be adjusted to control the perception of depth.

To create the 3D anaglyph, the three-dimensional world is read and the points (cities) projected onto a two-dimensional plane. The X and Y positions in the 3D world are mapped to their same positions on the 2D plane and colored RED. The X position in the 3D world is then shifted horizontally in proportion to its depth (the Z dimension) and then mapped, along with its unaltered Y position, on the 2D plane and colored CYAN. If the cell in the 2D plane was already RED, the position is then colored BLACK.

Saved configurationsz:

The Lorenz Attractor:
From Wikipedia: 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...

Lorenz Attractor - 3 views - Color and 3D Anaglyph
This application shows all three 3-dimensional plane projections. The user may choose to color the points progressively from black, through the cool and then warm colors, to white as the function is iterated, or choose to create a 3D anaglyph which requires red/cyan glasses to see. The red color is plotted as previously, but the cyan color is displaced to the right in proportion to the projection into the screen. The code was further modified to display white at any pixel where red was overlain by cyan or cyan was overlain by red. The image above is a composite of both visualization choices.

x

Lorenz Attractor - 1 view - Color and 3D Anaglyph - Large
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 user may choose a color visualization to show additional chaotic behavior that is obscured in a single color plot, or may choose a 3D anaglyph which requires red/cyan glasses to see. The red color is plotted as previously, but the cyan color is displaced to the right in proportion to the projection into the screen. The code was further modified to display white at any pixel where red was overlain by cyan or cyan was overlain by red. The image above is a composite of both visualization choices..

 

3D Photography
Several 3D cameras have been commercially marketed over the years. Many are now collector's items. However, any camera will work and with PhotoShop you can make your own 3D anaglyphs. For depth as the eye would see it, simply take two photographs from the point of view of each eye (two photos about 2.5" apart). This gives good depth to objects up to a distance of about ten feet. For more distant scenes, take one photo and then step sideways and take another. For panoramic outdoor shots (mountains, canyons, beaches) take two photos several steps apart.


ALiCE Laboratory Under Sonctruction in "Arts, Culture & Technology"
ISIS Bay 12 at Smith Tobacco Warehouse
.


ALiCE Laboratory Under Sonctruction in "Arts, Culture & Technology"
ISIS Bay 12 at Smith Tobacco Warehouse
.


"Arts, Culture & Technology" Bays at Smith Tobacco Warehouse
ISIS (Information Science & Information Studies) Front Entrance.

How to do it...