Originally written in June 1998
Okay. The logic of the dome was described in Part I, and the mathematics of the dome was described in Part II. A lot of words, pictures, and tables - but what does it look like? Here's a snapshot of a patch...
The current web-ready visualization technology is VRML (Virtual Reality Markup Language.) If you don't know about it (but you want to) check out the VRML consortium's pages for more information, or just go to your local bookstore and browse the shelves. VRML is principally a representation format, not a programming language, so it's missing some stuff that would make it more internally functional, especially computational facilities like those in PostScript. Such is life.
I'm also building a coffee-stirrer and pipe cleaner model (along the lines of the cheap modeling technique described previously) but realizing the structure in VRML is a lot quicker. So far the model is great - it's rigid enough to wave around and bounce off things without deforming. Something that you just can't do with a single geodesic shell patch.
In any case, the code to generate octet-struted icosahedral geodesic patches has been modified to produce a VRML world instead of a tabular html page.
A 10-frequency patch may be viewed here if your browser has a VRML plug-in loaded. The white struts are the geodesic shell, the orange-red is the inner, and the connecting struts are the not-so-white-not-so-orange-red color in between. A small Red X Green Y Blue Z axis floats at the center of the world - zoom out if that's all you can see. If you don't have a suitable viewer, surf to where you got your browser and download one.
One of the interesting parts of all this was writing the code to draw a strut in VRML.
VRML is pretty cool, but you have to know how to do some 3D to do more than play. The language comes with some basic shapes like spheres, cylinders, boxes, and cones, and a full set of rectilinear transformation mechanisms. You effectively build a "graph" of the scene you wish to represent and let the user explore. VRML is also capable of doing animation, triggering scene-modifying code, and hyperlinking to html pages (or other VRML worlds.) If I could count on everybody having viewers and the scenes took less time to download, you might be reading this in an immersive environment right now.
Anyway, to draw a mathematical scene you really need to figure out all the geometric transforms yourself and know how to write the VRML. To define the strut, I start with a cylinder. Since "up" for me is always along the Z axis instead of VRML's Y axis, I transform the strut-space into my more-familiar setting. This isn't strictly necessary of course, but it did make it easier for me to debug the code... Change the machine, not the person.
Next I slide the unit cyliner up to be sitting on the XY plane and scale it to be tall and thin, 1 unit tall. To orient the strut in 3D, I need to do some spherical coordinate conversions. Fortunately, these are already embodied as methods of the CPoint and SPoint objects in the code. Since I know the start point of the strut-cylinder is currently at (0,0,0), to get the right orientation all I have to do is scale the strut to the right length and rotate it into position by spinning it first around the X or Y axis and then the Z axis. Now the strut simply needs to be translated to the real start point and voila, I have a correcly sized, oriented, and positioned cylinder. Sweet.
I've happily tucked it away and won't have to think about it any more. Thank you Mr. Reuse.