|
3D mathematical shapes Ed Mackey 1~1987
History 01-Nov-2000: Allocation checks 30-Mar-1997: Turned into a module for xlockmore 4.02 alpha. The code is almost unrecognizable now from the first revision, except for a few remaining two-letter variable names. I still don't have the normal vectors working right (I wrote the buggy normal vector code myself, can you tell?) 07-Jan-1997: A legend reborn; Superquadrics make an appearance as a real OpenGL program written in C. I can even render them with proper lighting and specular highlights. Gee, they look almost as good now as the original color plates of them that my uncle showed me as a child in 1981. I don't know what computer hardware he was using at the time, but it's taken a couple decades for the PC clone hardware to catch up to it. 05-Jan-1997: After almost a decade, Superquadrics had almost faded away into the myths and folklore of all the things my brother and I played with on computers when we were kids with too much time on our hands. I had since gotten involved in Unix, OpenGL, and other things. A sudden flash of inspiration caused me to dig out the old Pascal source code, run it through p2c, and start ripping away the old wireframe rendering code, to be replaced by OpenGL. Late 1989 or early 1990: Around this time I did the Turbo Pascal port of the Superquadrics. Unfortunately, many of the original variable names remained the same from the C= 64 original. This was unfortunate because BASIC on the c64 only allowed 2-letter, global variable names. But the speed improvement over BASIC was very impressive at the time. Thanksgiving, 1987: Written. My uncle Al, who invented Superquadrics some years earlier, came to visit us. I was a high school kid at the time, with nothing more than a Commodore 64. Somehow we wrote this program, (he did the math obviously, I just coded it into BASIC for the c64). Yeah, 320x200 resolution, colorless white wireframe, and half an hour rendering time per superquadric. PLOT x,y. THOSE were the days. In the following years I would port Superquadrics to AppleBASIC, AmigaBASIC, and then Turbo Pascal for IBM clones. 5 minutes on a 286! Talk about fast rendering! But these days, when my Pentium 166 runs the same program, the superquadric will already be waiting on the screen before my monitor can change frequency from text to graphics mode. Can't time the number of minutes that way! Darn ;) Ed Mackey
|
|
|
|