    3dg--> vector file viewer + source by Greg Ecker.

    usage:  3dg <file.3d>  or, type '3dg', and enter the name of the '.3d'
  file to view.

        I wrote '3dg' because last year I downloaded I program called 
  '3dv', and thought it was really cool.  I really wanted to look at the
  source, but the author chose not to distribute it.  I became incensed,
  and proceeded to write it myself.  I also managed to use it as a final
  project for a course at school.  The interface is a bit different from
  the original, but it should be easy to follow.  Click on a button for
  the rotation it is marked as (i.e., puch the 'X+' button for a positive
  rotation about the x-axis.  The buttons will time out & disappear, if
  the mouse is not moved for a while.  That's all there is to it.

        The code:  the code is mostly c++, with a little bit of assembly,
  all written with Borlandc 3.1.  I tried to use as many object-oriented 
  techniques as I knew at the time.  The assembly is just used for the
  mouse routines (some in-line).  All of the graphics were done using
  Borland's BGI routines (pretty slow), and this program could no doubt
  be optimized to go much faster.  There are countless other techniques
  which could have been used for optimization,  but I got bored of the
  project before I got it squeeky-clean.  I think that the code may be of
  interest to somebody just getting into 3d-programming, that's why I'm
  posting it.  If you feel like modifying it, go ahead,  just please send
  me some mail if you're doing something cool.  
        My e-mail address is 'eckerg@is.nyu.edu'

        The file-format:   I didn't write these files,  I took them straight
  from the original author of '3dv', and made a slight change.  
  The file format I used is this:
        <sx> <sy> <sz>          // 3 scale floats (to adjust the values of
                                //  individual numbers. (This is different
                                //  from the original format.)
         <int n>                // # vertices in the file.
 <float x> <float y> <float z>  // each individual vertex (one x,y,z for           
                                // each vertex.
        <int e>                 // # edge definitions (including jumps). 

 <int to_index> <int color>     // This is how an edge is represented,  
                                // kind of like 'logo'.  The first int, 
                                // 'to_index' is
                                // the index of the destination vertex to
                                // write to (from the current position).
                                // The second number is the color of the
                                // edge.  A 'color' of 0 indicates a jump
                                // to the 'to_index', with no actual edge
                                // being drawn.  Thus, the first edge 
                                // description is always a 'jump',  thereby
                                // marking the starting current position.
                                // (think of 'moveto()', and 'lineto()' to
                                // get a better idea.

 note:  I do not reccommend this format to anyone choosing a vector 
     file format, for it is not easy to parse, is very limited, and not
     very compact.  I just used it because I wanted to use files that were
     done with it.

 note:  The bgi routines were blinking pretty bad,  so I used code which
     I did not write to sync the writes with the vertical retrace.  The
     code was originally published in Computer Shopper's 'tech section',
     and I obtained it from a great ftp site.

Standard disclaimer:
        I do not take responsibility for any damage done to your machine
        through the use of this program.  This program is free and shall
        not be charged for.  Feel free to use any part of it you want.


