upl@puff.cs.wisc.edu (Future Unix Gurus) (04/07/88)
A few articles back someone posted an article wondering why there weren't any entry level (read: cheap) 3-D graphics systems based on integer math. I just wanted to add my opinion to this group to say that I agree. A few months back on my PC I wrote a fairly well developed 3-D graphics program in assembly languge using only 32-bit integer math. The fixed point numbers were arranged in the form: 0101010101010101.0101010101010101 (32 BITS) (whole number) (fraction) I wrote my code on an 7.5 MHZ 68008 (identical instruction set to the 68000 but with an 8-bit data bus). This processor is about as fast as a 4 MHZ true 68000 based machine. My program could rotate, scale, clip, add perspective and display between 2500 and 3500 points per second. My screen resolution is 512x256, so any errors in the fixed point routines aren't noticeable. I hand optimized the code over a number of weeks, and all of my code should work on any 68000 based machine. All of the main loops use only register variables , and register to resgister arithmetic. Although fixed point numbers have their limitations they're great for games, and for doing some 3-D applications (I believe the 'flight simulator' program uses only ficed point numbers, and it looks fine). If there is enough interest I'll post a listing of the basic transform algorithm, which should work on any 68k based machine. As an added bonus, many of the transform loops will cache on the '020. -Eric P.S. After I finished the program on my PC, I ported the assembly language to an HP bobcat here at the U.W. (the Bobcats are '020 based machines). The port for the cat could rotate and display between ~16000 to 20000 points per second. ( thats on the low side.)
carroll@snail.CS.UIUC.EDU (04/08/88)
Yes, the SubLogic FlightSimulator uses *only* integers, and 16 bit ones at that. The code that drives it is highly optimized (Bruce Artwick, the president and primary programmer/designer of the simulator is a true assembler God). In many cases, however, it gets the "wrong" answer, but it takes advantage of the facts that 1) if you are generating several frames per second, messing up one is not a big deal and 2) if the user doesn't notice it doesn't really matter. I believe that the company sells a programming package called "IB3D1" which allows you to use the core of the F.S. to do your own graphics. The company is located in Champaign IL (or possibly Urbana - they are really 1 city, and I think there are actually SubLogic offices in both places). I worked there last summer, so I got to use stuff without having to pay for it. Alan M. Carroll amc@woodshop.cs.uiuc.edu carroll@s.cs.uiuc.edu Grad Student (TA) / U of Ill - Urbana ...{ihnp4,convex}!uiucdcs!woodshop!amc Quote of the day : "Touch my soul, catch the very light Hide the moment, from my eager eyes"