An Interactive 3-D Kaleidoscope in VRML
by
Anu Garg

How to use VRML kaleidoscope?
You can create beautiful symmetric patterns using this VRML kaleidoscope. Drag any of the objects with the mouse and bring it to the center. You can also rotate the objects.

With SGI Cosmo Player, you can move any of the objects. With Netscape Live 3D, you need to move any of the original objects (in the first quadrant) and not their mirror images to move all the objects. It doesn't work with Sony Community Place; only the original objects are moved, their mirror images remain still.

If you have tried it with any other browsers, please drop me a note on how it works in them.


What is a Kaleidoscope?
The kaleidoscope was invented by Sir David Brewster in 1816. Typically, it is made in the form of a tube with a viewing hole. Rotating the tube creates fascinating colorful patterns that charm both children and adults alike.
Theory behind the kaleidoscope
A kaleidoscope is formed by placing two mirrors at an acute angle. Few colorful trinkets are placed between the mirrors. The trinkets could be a few pieces of colored glass, confetti, marbles etc. The two mirrors reflect the objects placed between them. Each of the mirrors reflect the image formed by the other mirror and thus together they form multiple images of the objects. The number of images is determined by the formula:
number of images = (360 / angle between the mirrors) - 1
As the tube is rotated, the trinkets move and form varying patterns that shift in majestic beauty.

Another form of kaleidoscope uses three mirror each placed to form a hollow prism.


Implementation notes
To represent the trinkets between the strips of two mirrors, I created few objects in first quadrant of the VRML World. To create the mirror images of the kaleidoscope, I replicated this first set of trinkets four times, each rotated by 72 deg. to the previous set of trinkets. So, the (virtual) mirrors in this kaleidoscope world are placed at an angle of 72 degrees producing a 360/72 - 1 = 4 images.

To create the effect of changing patterns, I employed a PlaneSensor node that captures the dragging of objects by the user, and wires the changed coordinates to the trinkets. Since the original objects are DEF'ed and then USE'ed to depict mirror objects, the translation in original objects causes equivalent translation in the mirror objects also, and the whole pattern rearranges to make another interesting pattern.


Questions, comments, suggestions?
If you have any questions or comments about the VRML kaleidoscope, or if have any suggestions for improvement, please drop me a line.