home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-1.iso / CDROM / READMEs / Peanuts-2 / Science / mathematics / 2DLab.3.1.README next >
Encoding:
Text File  |  1996-11-09  |  7.9 KB  |  191 lines

  1. README - 5/94 BR
  2.  
  3. 2DLab has been modified to be compileable under NS 3.x.
  4.  
  5. README 1/92 BR
  6.  
  7. 2DLab 3.0 is a modified version of 2DLab 2.0. In it, we (Mary, Bill
  8. and Renato) have added several algoritims that attempt to find a
  9. solution to the Travelling Salesperson problem. We have also added a
  10. tour optimzer and changed the menus around. Version 3.0 is the result
  11. of a project for a graduate course in Mathematical Programming(CS720)
  12. in the Fall of 1991 at the University of Wisconsin-Madison. None of
  13. the functionality from version 2.0 has been changed. Below is the
  14. README text for version 2.0:
  15.  
  16.  
  17. README - 9/91 PJF
  18.  
  19. This directory contains sources for 2DLab, an interactive tool
  20. for visualizing some common geometric algorithms.
  21.  
  22. The source code for Voronoi diagrams and Delaunay tesselations
  23. was writen by Seth Teller (of SGI?) and available on many archive
  24. sites.
  25.  
  26. ** Ignore the warning messages that appear during compilation. ** 
  27.  
  28. ------------ Info from the Help Panel ----------------------------------
  29.  
  30. 2DLab animates a few algorithms from computational geometry and
  31. combinatorial optimization.  It was originally released in early 1990,
  32. back when I was a graduate student at Michigan State University.  In
  33. the process of updating the program for 2.0, things changed
  34. substantially, and many features were added.  I hope you like the
  35. program.
  36.  
  37. Running the program
  38. Two windows will appear when 2DLab is fired up.  The Geometry Window
  39. contains the data and the results of any algorithms run on the
  40. data.  The 2DLab Control window allows you to configure the data
  41. set, the algorithm, and the drawing that takes place.
  42.  
  43. When the program is invoked, the Drawing Window will contain ten
  44. points, and the selected algorithm (Prim's MST algorithm by default)
  45. will be applied to these points.  New points can be created by
  46. clicking in the window.  There is a `margin' around the border of
  47. the window  within which points will not be displayed, so If you
  48. click the mouse button and no point appears, you're probably too
  49. close to the edge (this margin was put in to make the Voronoi
  50. tesselation have a nice border.
  51.  
  52. A new set of random points (uniformly distributed within the window's
  53. usable region) can be generated by entering the desired number of
  54. points in the editable text field and pressing the Generate button.
  55.  
  56. The highlighted button in the RadioButton array in the Control
  57. Window identifies the particular algorithm to be `animated.'
  58.  
  59. The Anim/Disp button will run the appropriate animation when pressed.
  60. The Disp button will simply display the resulting data structure without
  61. animating.  It only works when the data structure has already been previously
  62. computed (i.e. ya gotta Anim before you can Disp).
  63. The Auto-Go checkbox specifies the program's behavior when new
  64. points are created with the mouse.  If the box is checked, the
  65. selected algorithm is run immediately when a new point is added.
  66.  
  67. The three color wells allow you to pick background, foreground,
  68. and highlighting colors.  When the display is drawn, points and
  69. line segments appear in the foreground color.  During animation,
  70. transient drawing is done using the highlight color.  By default,
  71. these colors are white, black, and  67% gray, respectively.  You
  72. can set them to anything you want using the standard color well
  73. tricks.
  74.  
  75. The line width slider controls how thickly everything is drawn (both
  76. points and lines).
  77.  
  78. The `Status' item displays informative (?) messages about the
  79. progress of the algorithm currently being animated, the drawing
  80. taking place, etc.
  81.  
  82. The Document menu allows you to save the current data set in a
  83. `generic' form, load a similarly-formatted file in for animation,
  84. and save the generated imagery as TIFF or EPS.  The file format
  85. for the data is simple.  The first number is the number of ordered
  86. pairs (%d), and the remaining numbers are the pairs (%f %f).  The error
  87. checking for I/O is pathetic, so please feed 2DLab well-behaved data files.
  88.  
  89. The Copy item of the Edit menu may be selected.  It sticks the contents of
  90. the Geometry window in the pasteboard.
  91.  
  92. Algorithms
  93.  
  94. In the following brief descriptions, N is the number of 2D points, and
  95. the O-notation refers to time complexity rather than space complexity.
  96. When the algorithms are invoked, those with quick eyes will notice
  97. some graphical razzle-dazzle as the data structure is constructed.
  98. After the algorithm has completed, the `resulting' data structure will
  99. remain in the window.
  100.  
  101. - Prim's O(N^2) Minimal Spanning Tree (MST) algorithm.
  102.  
  103. - Kruskal's O(E log E) MST algorithm. WARNING: the implementation
  104. in this program is NOT optimal (it's actually O(N^2)).  Anybody
  105. who wants to hack together the priority queue stuff to implement
  106. the optimal algorithm is free to do so (lazy, that's me).
  107.  
  108. - Jarvis' O(N log N) convex hull construction algorithm.
  109.  
  110. - Graham's O(N log N) convex hull construction algorithm.
  111.  
  112. - Somebody's O(N log N) Voronoi diagram algorithm.
  113.  
  114. - Somebody's O(N log N) Delaunay triangulation algorithm.  (code
  115. for these last two algorithms was written by Seth Teller, who
  116. apparently used Fortune's netlib code as a basis).
  117.  
  118. - my own Gabriel Graph construction algorithm (it uses the
  119. Delaunay triangulation as a starting point).
  120.  
  121. - my own Relative Neighborhood Graph construction algorithm (again,
  122. using the Delaunay triangulation as a starting point).
  123.  
  124. Those interested in the details of the algorithms should refer to
  125. Preparata and Shamos' book on computational geometry.  Sedgewick's
  126. book also has covers geometric algorithms.  The GG and RNG haven't
  127. been used much, and are a little harder to find in the literature.
  128. Consult Toussaint, `The relative neighborhood graph of a finite point
  129. set', Pattern Recognition 12, 261-268 for info about the RNG.  The
  130. Gabriel graph was used in Matula and Sokal, `Properties of Gabriel
  131. Graphs Relevant to Geographic Variation Research and the Clustering of
  132. Points in the Plane', Geographical Analysis 12, 205-222.  However, I
  133. don't have either of those papers in my posession.  This software was
  134. based on the discussion in Tuceryan and Chorzempa, `Relative
  135. Sensitivity of a family of closest-point graphs in computer vision
  136. applications', Pattern Recognition 24, 361-374.
  137.  
  138. Algorithms for 3.0:
  139.  
  140. Stupid Neighbor: This is basically a test algorithm that connects
  141. point 0 to point 1, point 1 to point 2, and so on. It is useful for
  142. testing the tour optimizer, and seeing how bad an algorithm can
  143. be.(Bill Roth, 1991, previously unpublished)
  144.  
  145. Cheapest Insertion: This algorithm finds the point that can be added
  146. with the least cost to the over all solution. (Salkin & Mathur,
  147. Foundations Of Integer Programming, 1989 North-Holland, p 683.)
  148.  
  149. Nearest Neighbor: At a given point, an arc will be drawn to the
  150. nearest unvisited point in the graph. (Lawler, Lenstra, et. al., The
  151. Traveling Salesman [sic] Problem, 1985, Wiley and Sons, p 150.)
  152.  
  153. Nearest Addition: Given a set of connected points, the point nearest
  154. to an existing arc will be added to the graph.( Lawler, Lenstra, et.
  155. al., The Traveling Salesman [sic] Problem,1985, Wiley and Sons, p
  156. 157.)
  157.  
  158. Farthest Insertion: This algorithm finds the point farthest away from
  159. all of the points in the tour, and finds the best place to insert it.
  160. (Lawler, Lenstra, et. al., The Traveling Salesman [sic] Problem,1985,
  161. Wiley and Sons, p 226.)
  162.  
  163. The tour optimization procedure comes from Salkin & Mathur,
  164. Foundations Of Integer Programming, 1989 North-Holland, p 690-93.
  165.  
  166. About the authors.
  167. This program was written by:
  168.  
  169. Patrick Flynn
  170. Assistant Professor
  171. School of Electrical Engineering and Computer Science
  172. Washingon State University
  173. Pullman, WA 99164-2752
  174. (flynn@eecs.wsu.edu)
  175.  
  176. For Version 3.x:
  177. Mary Tork Roth "the Brains" (torkroth@cs.wisc.edu)
  178. Bill Roth  "the Brawn" (roth@cs.wisc.edu)
  179. Dr. Renato De Leone  "The Professor" (deleone@cs.wisc.edu)
  180. Computer Science Department
  181. University Of Wisconsin
  182. 1210 West Dayton Street
  183. Madison, WI 53706
  184.  
  185. If you find bugs, let us know.
  186. If you add functionality, let us know.
  187. If you like/hate it and just want to tell us, let us know.
  188. Date: 5/94.
  189.  
  190. Finis Coronat Opus.
  191.