Vous êtes sur la page 1sur 3

This file is just some basic babble about FORM's past. 1. There is no section 1. 2.

MOTIVE The FORM program was started in April '93 as an exercise in using C++ and LEX and YACC, it has grown from it's original modest intentions. 3. OUTPUT formats, and historical digression When form was originally written it was designed to output text files for input to POVRAY and to REND386, this used to be the only way to actually see what had been created, but I got fed up with the low quality of display from REND386 (although there is a lot to be said for truly real time display), and didn't have the patience to wait for a raytrace from POV every time, so I built in the screen display that you have seen and now I use it all the time. 3.1 POV output Pov output from FORM goes to a file temp.pov. The output file is (usually :-) suitable for raytracing using the formvue2.pov sample file. The form is always scaled so that it fits inside a unit box for ease of placement. You can input textures inside FORM but you will probably want to edit the output file to fine tune the textures. FORM can now output declares for the primitives allowing you to substitute your own shapes for the inbuilt primitives. This was a suggestion from DAN FARMER. 3.2 PLG output PLG output from FORM goes to a file temp.plg. The output file is suitable for input to rend386 (sometimes known as DEMO3 or DEMO4). This output is crude and not optimal at all. REND386 does give a fast real time display, but a problem I have had is that if the form starts getting complicated (which they do very rapidly) bits start to disappear from the screen. 3.3 VIVID output (implemented for John Beale) John requested VIVID output, and since I used to think VIVID was the bees knees I've implemented it. It's a bit clunky but it is functional. Testing the output from this sidetracked me for a week looking for a "bug" in VIVID that wasn't there, or anywhere for that matter (a virtual bug!). That'll teach me to accuse other peoples programs of mistakes! 3.4 DXF output This is slow and very big. Most DXF importers don't like FORM's DXF output, although 3D studio doesn't mind. There are two flavours -DXF1 being non heirachical and big -DXF2 being small and heirachial. 3.6 VRML output

Now working. 4. TOOLS USED The code was originally developed under DJDelories Gnu C++, but I changed to Borland's C 3.1 (now 4.5) compiler, debugger and profiler. The source code has been kept under control by MKS RCS, which has saved the code from being completly lost three times so far. I use GNU's FLEX and BYACC, although I have had to modify the skeleton code to FLEX to provide include file capability and fix other minor incompatibilities. 5. BORROWED, BEGGED AND STOLEN SOURCE CODE :-). Since I hate re-inventing the wheel I have in the course of this project used code from Graphics Gems (the source code not the book) Kendall Bennett's SVGAKIT, assorted parts of FRACTINT, and the PNG public code. The Graphics Gems code proved a great source of inspiration, and a good stepping stone to developing customised algorithms since I could see if the idea worked first and then rewrite for integer arithmetic. SVGAKIT on the other hand was used practically as is. A very useful package for IBM PC programmers. I have since dropped SVGAKIT since it isn't siutable for Borlands DPMI system, but without it I would have been a lot slower getting started. PNG was added-in in about an hour, and worked first time, before I even had a PNG decoder! 6. TECHNICAL INFORMATION I have rigged the code so that integers are used for most of the drawing, giving somewhere around a five times increase in speed compared against using floating point operations on a non 486. There was a slight loss in quality, (try a single sphere at 320x200 res) but it was worth it. I may improve the quality since I now know what causes it, much rewritten code later! Some improvement in quality has now been made in V3 , and I don't intend to change it any more except for bug fixing. The drawing method used is a simple polygonal ZBUFFER algorithm, with gouraud shading. The polygons are rendered using integer algoritms, including the depth, and intensity fields. All other calculations in the system are performed using single precision floating point. If you want to see how long form takes to parse a file run with the command line flags "-display-", no output is generated, and so the time taken is simply the load and process time. For those of you who are really interested the TGA file is uncompressed with a 256 colour palette. It's only TGA because that was the easiest. GIF is now my standard (ta fractint).

CREDITS The code for this program came from many sources, UNIVESA and SVGAKIT came from Kendall Bennett. I no longer use this but it was a useful springbard. FLEX the lexical analyser came from the GNU project BYACC came from heaven knows where! The GIF encoder is a very mutilated version of the one in Fractint. Thanks to the stone soup team, for making their source freely available. ( and for sstools.ini , you should see the junk in mine!) The PNG encoder is the public domain version, without ANY changes! The palette used for display in 256 colour mode is FRACTINT's ALT.MAP. Thanks to the people who published code from Graphics Gems I, II and III. While very little of their code finally ended up in FORM many of the display routines were originally tested using their code. The Graphics Gems collection was a real godsend and should be in your source code collection. It can be retreived from wuarchive.wustl.edu somewhere in \graphics\graphics. PANTEK Ltd for allowing me to release this. Stephen Todd and William Latham for the inspiration and a good book. Evolutionary Art and Computers, Todd and Latham, Academic Press, ISBN 0-12-437185-X Andrew Pearmund for providing a much needed get_pixel function without which FORM couldn't save any pictures, and for breaking the program it every time I showed it to him. Sue Cunningham for being with me, and constantly praising my feeblest efforts at creativity, and finally showing me the sort of form that could be created! I still feel shocked looking at them. Most of her forms are included with this release. Robert Fargher for being the first person who sent me a FORM, and for praising FORM. Thanks. Dan Farmer for many suggestions and encouragement. And for rendering some exquisite textures. Thanks also. Thanks to the rest of you who have since sent me Forms I have included many of them in this release. All the rest of you who wrote, it's given me great encouragement. rummy@snaffle.demon.co.uk Andrew Rowbottom

Vous aimerez peut-être aussi