home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / IRIT / POLY3DS.ZIP / POLY3D.DOC < prev    next >
Encoding:
Text File  |  1990-05-05  |  9.8 KB  |  209 lines

  1.     POLY3D - 3d polygonal display program
  2.     -------------------------------------
  3.  
  4.   BECAUSE POLY3D IS LICENSED FREE OF CHARGE, I PROVIDE ABSOLUTELY NO WARRANTY,
  5. TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN OTHERWISE STATED
  6. IN WRITING, I GERSHON ELBER PROVIDE POLY3D PROGRAM "AS IS" WITHOUT WARRANTY OF
  7. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
  8. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  9. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
  10. YOU. SHOULD THE POLY3D PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
  11. NECESSARY SERVICING, REPAIR OR CORRECTION.
  12.  
  13.   IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL GERSHON ELBER,
  14. BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES,
  15. OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
  16. USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR A
  17. FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY GERSHON
  18. ELBER) THE PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF
  19. SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
  20.  
  21.     This program reads polygonal text data files and displays them
  22. on graphics devices. Format of the text files is briefly explained in the end
  23. (appendix A).
  24.  
  25. Options:
  26. --------
  27.  
  28. poly3d [-c] [-m] [-i] [-e #Edges] [-n] [-N] [-o Objects...] [-v ViewFile]
  29.                                 [-z] DFiles
  30.  
  31.   -c : Closed object - if an object is closed (such as objects created by
  32.        irit solid medeller) each edge is actually displayed twice - once
  33.        for each adjacent polygon. This flag will ensure every edge will be
  34.        displayed only once.
  35.   -m : More - give some more information on the data file(s) parsed.
  36.   -i : Internal edges (created by IRIT) - default is not to display them, and
  37.        this option will force displaying them also.
  38.   -e n : # Edges to use from each given polygon (default all). Very handy to do
  39.        '-e 2' on data created from DRAWFN3D.
  40.   -n : Draw vertices normals if data file has them.
  41.   -N : Draw polygon normals if data has them (PLANE definition).
  42.   -o Object(s) : Objects to display (all by default). Object is the name as
  43.        appears after the OBJECT key word the data files
  44.        (do 'grep OBJECT datafile'...).
  45.   -v ViewFile : View file - file of the view matrix transformation
  46.   -z : Print version number and current defaults.
  47.  
  48. Configuration:
  49. --------------
  50.   The program can be configured using a configuration file named poly3d.cfg.
  51.   This is a plain ascii file you can edit directly and set the parameters
  52. according to the comments there. executing 'poly3d -z' will show the
  53. current configuration as read from the configuration file. This file can be
  54. in any directory which is in your path - the same place as poly3d.exe is
  55. probably a good choice.
  56.  
  57.   MSDOS version only:
  58.   The program supports VGA/EGA, CGA & HERCULES graphics card, and uses the
  59. Turbo C autodetect feature. If this fails you can always coerce it to a
  60. specific card - see the poly3d.cfg file.
  61.   The program will use 80?87 if it detects one - again uses the Turbo C 80?87
  62. autodetect, or will run (much!) slower withoutit...
  63.   The program will use the mouse, if detected. If this detection fails you can
  64. coerce it (to TRUE - exists, or FALSE) in the poly3d.cfg configuration file.
  65.   Note msdos has different configuration file than unix (poly3dms.cfg).
  66.  
  67.   Unix version only:
  68.   Add the following options to your .Xdefaults. Most are self explanatory.
  69. The Trans attributes control the transformation window, while View control
  70. the view window. SubWin control the subwindows within the Transformation
  71. window.
  72. poly3d*Trans*BackGround:    CornflowerBlue
  73. poly3d*Trans*BorderColor:    Red
  74. poly3d*Trans*BorderWidth:    3
  75. poly3d*Trans*TextColor:        cyan
  76. poly3d*Trans*SubWin*BackGround:    salmon
  77. poly3d*Trans*SubWin*BorderColor:  yellow
  78. poly3d*Trans*Geometry:        =150x500+550+50
  79. poly3d*Trans*CursorColor:    green
  80. poly3d*View*BackGround:        CornflowerBlue
  81. poly3d*View*BorderColor:    Red
  82. poly3d*View*BorderWidth:    3
  83. poly3d*View*Geometry:        =500x500+50+50
  84. poly3d*View*CursorColor:    green
  85.   Also note the configuration file is shorter (poly3dun.cfg)
  86.  
  87. Usage:
  88. ------
  89.   The control of the program is performed by moving the graphical cursor along
  90. the menu and performing EXECUTE operation (see below). Moving the cursor can
  91. be made using the numerical keypad/arrows (shifted for faster movement) or
  92. if mouse is available, using the mouse. Two operation are defined and allowed:
  93.   EXECUTE - the <Return> key on the keyboard, or left  mouse button if exists.
  94.   ABORT   - the <Space>  key on the keyboard, or right mouse button if exists.
  95. The EXECUTE operation is used to request performing the selected menu item.
  96. The ABORT operation is used to request abortion of current operation (handy for
  97. big data files).
  98. ALT-Q can be used at any time for program abortion exactly as 'Quit' menu item.
  99.  
  100. Output:
  101. -------
  102.   Poly3d can save viewing matrix (to be used by poly3d-h or poly3d-r for
  103. example), PostScript file of the current view and the msdos version can
  104. save gif image of the screen as well (in VGA/EGA and Hercules modes).
  105. All files will be named genericX.EXT where EXT can be '.mat', '.ps' and
  106. '.gif' respectively. X is single digit so up to 10 distinguished files of
  107. each type can be saved each time.
  108.  
  109. Bugs:
  110. -----
  111.   O.k. if you do have any question, suggestion, or even want to report a bug
  112. feel free to send me email (see below)
  113.  
  114.   Feel free to make copies of this program, and distribute them FREE of
  115. charge, provided that all this package is distributed.
  116.   I am not going to be responsible for any damage of any kind, that this
  117. package may cause (I always wanted to say that...), but I hope you will
  118. enjoy it as I did my best you will. At list I enjoyed writing it.
  119.  
  120. Have Fun
  121.  
  122. Gershon Elber
  123. gershon@cs.utah.edu
  124.  
  125.  
  126. Appendix A (Polygonal text file format) - As of IRIT version 2.x:
  127. -----------------------------------------------------------------
  128.  
  129. This appendix defines the polygonal text file as defined to communicate
  130. between the various C utilities. Note this format is more strict than old
  131. releases and which should be considered obsolete ('.ply' should be
  132. regenerated from the '.irt' files). This strictness is mainly related to
  133. polygonal normals and vertices order - see POLYGON definition below.
  134.  
  135. Each structure in the text file must be within brackets ( [ ] ), anything
  136. outside should be considered comments, while structures can be nested.
  137.  
  138. Keywords:
  139.  
  140. 1. VERTEX - a vertex keyword will always be followed by vertex name and
  141.    3 floats defining the xyz coordinates of this vertex. For example:
  142.    [VERTEX V123 1.0 2.0 3.0]. If VERTEX has NORMAL attribute defined, it
  143.    will always point INTO the model.
  144.  
  145. 2. POLYGON - a polygon keyword will always be follows by polygon name and
  146.    list of vertices forming this polygon. The polygon includes the line from
  147.    last vertex in list to first one. For example:
  148.    [POLYGON P11 V123 V11 V45 V22]
  149.    At the time the polygon is defined all vertices in its list should be
  150.    known (No forward referencing).
  151.    A POLYGON should order its vertices (if it is a convex polygon) such that
  152.    cross product of 3 consecutive vertices will point INTO the model. If the
  153.    POLYGON has PLANE definition, the PLANE definition will point INTO the
  154.    object as well.
  155.  
  156. 3. POLYLINE - same as POLYGON, but the line from last vertex to first is
  157.    excluded.
  158.  
  159. 4. POINTLIST - same as POLYGON, but only the vertices are drawn as points
  160.    (no edges are drawn at all).
  161.  
  162. 5. OBJECT - an object keyword will always be follows by object name and
  163.    list of polygons forming this object. For example:
  164.    [OBJECT cube P3 P4 P5 P7]
  165.    At the time the object is defined all polygons in its list should be
  166.    known (No forward referencing).
  167.  
  168. Notes:
  169.  
  170. 1. Any number of vertices/polygons/object can be in one file.
  171. 2. As the intities above may have attributes (such as colors etc.) an
  172.    attribute can appear only immediately after the entity name. If more than
  173.    one attribute should appear, they will appear one after the other. For
  174.    example:
  175.    [VERTEX V123 [COLOR ...] [NORMAL ...] 1.0 2.0 3.0].
  176. 3. This definition of the text format is open to extensions, such that a
  177.    program reading undefined keyword, should ignore and attempt to continue and
  178.    parse the structure from the point the undefined keyword structure ends. For
  179.    example if a polygon has new attribute named TEXTURE, the whole TEXTURE
  180.    structure ( [TEXTURE wood.txt] ) should be skipped:
  181.  
  182.    [POLYGON P101 [TEXTURE wood.txt] V1 V3 V44]
  183.  
  184.    and should be read as:
  185.  
  186.    [POLYGON P101 V1 V3 V44]
  187.  
  188.    That includes also new keywords such as [SURFACE ...] (a hint!). A warning
  189.    that such undefined entity was detected may be proper.
  190. 4. No entity should be shared. I.e. although one vertex can belong to few
  191.    polygons, it should appear for each polygon seperatly. This sharing may
  192.    be supported, but it is not guaranteed, and discourage. This was done for
  193.    the sole reason of simplicity.
  194. 5. The keyword/entity names are case sensitive: "Cube" and "cube" are two
  195.    different names.
  196. 6. The following atributes are current used:
  197.    a. [PLANE A B C D] - plane equation of the POLYGON. Normal of the plane
  198.       equation (A B C) should point INTO the model.
  199.    b. [NORMAL A B C] - normal of a VERTEX. Should point INTO the model.
  200.    c. [COLOR C] - Color of the model. C is between 0 and 15 and corresponds
  201.       to colors in IRIT solid modeler (see irit.cfg for colors).
  202.    d. [RGB R G B] - Full RGB Color, where each element is in the range of
  203.       0..255.
  204.    e. [INTERNAL] - signals that this edge (from this vertex to the next)
  205.       has been created internaly and should not be visible usually. Such edge
  206.       can be created, for example, when a non convex polygon is decomposed
  207.       in convex ones: The splitting edges are tagged INTERNAL.
  208.  
  209.