The Clearinghouse for International Computing



Download Illusioner


Illusioner

by Tom Bernard

© 2006 - 2007 Bersearch Information Services
http://bersearch.com
Illusioner is open-source free-ware.




Fig. 1


System Requirements

Mac OS 10.4 or later running on Intel or Power PC hardware.. Illusioner might work under earlier versions of Mac OS X, but has only been tested against Mac OS 10.4.


Installation

Drop Illusioner.saver in '~/Library/Screen Savers/' or '/Library/Screen Savers/'. Open System Preferences and choose 'Desktop & Screen Saver'. Select the 'Screen Saver' tab. Select 'Illusioner' from the list of screen savers.


Usage

Typing the space bar will stop and restart Illusioner without waking the screen saver. Typing 's' will single-step Illusioner. Illusioner will resume animation after a period unless another single-step is taken. Type 'r' within the period to continue to view the current frame without resumption of animation. Typing 'x' or 'y' negates ortho animation on the respective axis. Typing other keys or moving the mouse will wake Illusioner.

#define kResumeAnimationTime 600

Currently the period after which Illusioner resumes animation is defined to be 600 seconds.



The Illusion

Illusioner will create an illusion with certain pictures. For example, download Extra Large - 289.8 kB from the Hubble Space Telescope website. Open the image and zoom it so that it fills your screen. Or use System Preferences to set the picture as your desktop wallpaper, then close Finder windows and clear any desktop clutter. Run Illusioner and stare at the center of the screen for 30 cycles. Then bump the mouse to wake Illusioner and look at the downloaded picture. Note that the illusion is most effective when watching the default animation. Typing 'x' or 'y' produces an animation that is less conducive to illusion, unless both 'x' and 'y' are typed together, in which case, an illusion opposite the first illusion happens.

This is a visual illusion, distorting visual perception. Several observers have reported similar descriptions of the observed visual distortion when observing the star field after watching Illusioner as described above. One observer, the author, observed that Illusioner fails to produce an illusion when text documents are observed after watching Illusioner. A possible hypothesis is that the star field lacks visual references and is therefore susceptible to illusion.

Illusions are dynamic. The moon illusion, the Ponzo illusion, and illusions of multistable perception are illusions of interpretation; what is seen remains static while the interpretation is dynamic. The illusion observed in the star field after exposure to Illusioner is also a dynamic interpretation of a static observation; Illusioner introduces a dynamic interpretation of depth perception.

Illusion - Wikipedia, the free encyclopedia
Gestalt psychology - Wikipedia, the free encyclopedia
Subjective constancy - Wikipedia, the free encyclopedia
Moon illusion - Wikipedia, the free encyclopedia
Moon Illusion Explained!
Gestalt - Wikipedia, the free encyclopedia
Ponzo illusion - Wikipedia, the free encyclopedia

Free-ware License

You may use Illusioner and the source code as you choose.


About the Source Code

Illusioner evolved from Exercise 2 of Rocco Bowling's OpenGL Bootcamp course offered by the Big Nerd Ranch (http://bignerdranch.com/). Consider Fig. 2 below.






Fig. 2


The top line was created with the following OpenGL code snippet:

glBegin(GL_LINES);

glColor4f(0.0, 1.0, 1.0, 1.0);
glVertex2f(0.25, 0.9);

glColor4f(1.0, 0.0, 1.0, 1.0);
glVertex2f(0.75, 0.9);

glEnd();


First, we set the color to cyan and describe the left endpoint of the line. Then we set the color to magenta and describe the right endpoint of the line. When OpenGL renders the line, OpenGL blends the color from cyan at the left to magenta at the right.

The lower shape is created with the following fragment:

glBegin(GL_TRIANGLE_FAN);

glColor4f(0.0, 1.0, 1.0, 1.0);
glVertex2f(0.25, 0.8);

glColor4f(1.0, 0.0, 1.0, 1.0);
glVertex2f(0.75, 0.8);

glColor4f(1.0, 1.0, 0.0, 1.0);
glVertex2f(0.75, 0.7);

glColor4f(0.0, 1.0, 0.0, 1.0);
glVertex2f(0.7, 0.6);

glColor4f(0.0, 0.0, 1.0, 1.0);
glVertex2f(0.8, 0.4);

glColor4f(1.0, 0.0, 0.0, 1.0);
glVertex2f(0.5, 0.2);


glEnd();

Again, we are associating colors with vertices, but this time, the vertices are describing triangles. And again, OpenGL blends the colors through the shape. Illusioner uses this technique to create rainbow colored ovals that are actually many triangles.

Bug reports and comments

Illusioner (at) bersearch.com



Credits

Design and engineering: Tom Bernard

Testing: Tom Bernard, Chris Newman, Brian Wetzel