char *helpf[] = {"\n README\n\n(The program is available via anonymous ftp at ftp.math.uiowa.edu, \nin the directory of wu/ming.)\n\nThe MD energy is defined by Jon Simon for polygonal knots. A polygonal\nknot K consists of several edges E_1, ..., E_n in the Euclidean space,\nwhich form a closed knotted loop. The ends of the edges are called the\nvertices of the knot. The energy contributed between E_i and E_j is\n (L_i)(L_j)/(D_ij*D_ij)\nwhere L_i is the length of E_i, and D_ij is the minimum distance\nbetween E_i and E_j. The energy of K is obtained by summing such\ncontributions over all E_i and E_j which are not adjacent.\n\nA knot can be deformed to another by an 'isotopy'. The problem about\ncomputation of knot energy is to find the minimal energy among all\nknots isotopic to a given knot. 'ming' is the a program which will try\nto find the minimal energy by pushing the knot along the direction of\nits 'energy gradient'. Actually this method does not find the minimal\nenergy. What it approaches are local minimals of the knot energy.\nFor example, the knots 4_1.8 and 4_1.8.2 in the directory 'knots' are\nboth figure 8 knots with 8 edges, and their energy can not be reduced\nby 'ming', but their energies are very different: 228 with 304! No\nalgorithm is known to find the absolute minimum of the energy for a\ngiven knot.\n\n'ming' is the graphic version of the earlier program 'min'. It can\nhandle knots with up to 510 vertices. It uses Silicon Graphics' Open\nInventor to draw the knot pictures, so it can run only on the SGI's\n(or at least so in our building.) One can specify different colors\nand sizes for the knot. When antialiasing is turned on, it will\nproduce high quality pictures, which can be recorded as postscript\nfile using 'snapshot'. (The program can also save postscript file,\nbut the file would not be antialiased.)\n\nAnother new feature of 'ming' is that besides adding vertices to the\nknot, it can now also delete vertices from the knot. It will test to\nmake sure that the deletion of a vertex will not change the knot type.\nIf no more vertices can be deleted in this simple process, it will\nturn on the 'pinch force', which will try to pinch certain edge,\nand then test to see if any vertex can be removed. This could be a\nuseful tool in finding the mimimal number of edges to represent a\nkont, although it is not expected to work for all knots.\n\nThe current version of ``ming'' can draw and edit knot directly on the\nwindow. It can not handle links of multiple components yet.\n\nPlease send any comments or problems to me at wu@math.uiowa.edu.\n\nYing-Qing Wu\nDepartment of Mathematics\nUniversity of Iowa\nIowa City, IA 52242\n", "\n COMMANDS\n\nThe following is a list of all the available commands. All of them\ncan be obtained be either click on the command buttons (run, smooth,\nadd, delete) or choose from the menus. All but the 'tr' command are\nsinsitive only to the first letter. Thus, for example, 'run: 10' and\n'r 10' will have the same effect: Both run the energy reducing process\n10 times. In bellow, N will denote a number, which could be integer\nor real.\n\n**********************************************************************\nNAME OF COMMAND EFFECT\n**********************************************************************\n\na N Add N vertices to the knot K. While N is greater than the \n number of vertices of K, the program will add one vertex for\n each edge. Otherwise, it adds vertices to the longest edges.\n\nA N Set the level of Antialiasing. N is between 1 and 255. If \n N=1, antialiasing is off. Higher antialiasing level will\n make the picture look smoother, but the rendering will be very\n slow if antialiasing is on. You may want to turn it on when\n using 'snapshot' to record knot pictures.\n\nc N Set the color perior. Try to choose periodic from 'color'\n menu, and enter the command 'c 3' to see how the color is \n changed.\n\nd N Delete N vertices from the knot. The program will delete\n a vertex only if it does not change the knot type. When no\n vertices can be deleted in the obvious way, and if 'add pinch\n force' is on (default), it will pinch one of the edges, and \n then try deleting again. \n\ne N Set the edge radius. N can be real number.\n\nO f Open the file 'f'. An alternative to the 'open file' dialog.\n\np N Set the pinch edge. If pinch force is turned on, the program\n will try to pinch this edge to a point in order to remove a \n vertex. Set 'p -1' to choose the edge having greatest angles\n to its neighbors (default).\n\nP N Set Pixel per inch when saving the knot picture as a \n postscript file. Default is 150.\n\nr N Run the energy minimizer N times.\n\ns Toggle between drawing smooth/polygonal knots. Same as the\n 'smooth' button. \n\ns n Drawing smooth knots. n determines the number of vertices on \n the smooth knots, default = 150. \n WARNING: When drawing a smoothing knot, the program replaces \n arcs with curves, so it is possible that the knot type shown \n could be different from what it actually is.\n\nS f Save the knot to file 'f'. An alternative to the 'Save file'\n dialog.\n\nt N If 'render' menu items is set to 'tube', this command will set\n the number of sides for the tube. For example, 't 3' will set\n the cross section of the tube as triangle. If N is larger, \n the tube will look smoother, but it will slow down the render\n process. The default value is 16,and the maximum is 32.\n\ntr Show/hide all triangles.\n\nV f n Save output to file 'f' every n steps. \n\nv f Continuously show knots in file 'f'. Acting like showing a \n video.\n\n", "\n MENU ITEMS\n\n\n1. FILE MENU. It contains 'open', 'save', 'save PS' and 'quit' items. \n 'save PS' will save the picture as a post script file.\n\n\n2. SIZE MENU. One can choose the radius of the knot tube here. The \n default value is 2.\n\n\n3. COLOR MENU. There are three ways to color the knot. \n (i) 'periodic': The color is changed periodically when traveling \n along the knot. Default period is 1, and can be changed by \n 'set color period'.\n\n (ii) 'depth': The color is determined by the z-coordinate of the \n point. \n\n (iii) 'single': Use single color.\n\n With 'choose knot color' one can choose several preset single \n colors for the knot. \n\n The next two items will bring up color editors for the knot (with\n single color) and the background. Click on the toggle buttons of\n the color editor to bring up the color map. \n\n The beckground color is specified by the diffuse color on the \n color editor. \n\n The last item prints the command 'color_period' for setting \n color period. See 'On commands' for more details.\n\n\n4. RENDER MENU. Rendering by line is the fastest. Rendering by tube\n is the default, and is probably the best. When the vertex number\n is small, rendering by cylinder-ball will show round vertices, but\n it is slow when vertex number is large. The 4th menu item prints\n the command for setting the tube sides. Try commands 't 1', 't 2'\n 't 3' and 't 10' to see the difference. \n\n \n5. OPTIONS MENU. \n (i) The first item toggles antialiasing on/off. When it is \n turned on, it set antialiasing level to 10. See 'On \n commands' for more details.\n\n (ii) The second item toggles rough run on/off. When rough run is\n on, each vertex of the knot is moved according to its own \n gradient. This method approaches the minimal energy faster\n for many knots, but it is not accurate. \n\n (iii) 'add pinch force'. This item is important when one wants to \n find the minimum number of edges to represent a knot. If \n this is off, the 'delete' command will only try to delete \n vertices without changing the other vertices. If 'add \n pinch force' is on, it add some extra force on certain edges,\n trying to pinch it to a point so that certain vertex can be\n removed.\n\n The other two items prints commands for setting antialiasing level\n and pinch edge. See 'On commands'.\n\n\n6. HELP MENU. Print these help messages.\n \n", "\n\n EDIT KNOT\n\n1. To draw a new knot, choose 'New' from 'file' menu. Use the \n following.\n\n Button 1 Click: Get a new vertex.\n Button 2 Click: Remove a vertex.\n Move with button 1 down: Move the new vertex horizontally.\n Move with buttons 1 and 2 down: Move the new vertex vertically.\n\n\n2. To edit a knot:\n \n (1) Click the 'edit' button.\n (2) Click the arrow icon on the left of the 'edit' button.\n (3) Use the following mouse actions.\n (4) Click 'edit' to exit the edit mode.\n\n Button 1 Click: (i) Pick a vertex or edge, or\n (ii) remove a triangle.\n Button 2 Click: Add a vertex on a picked edge or\n remove a picked veretex.\n Button 3 Click + Button 1 down: Show the triangle at the picked\n vertex.\n Move with button 1 down: Move a picked vertex horizontally.\n Move with buttons 1 and 2 down: Move a picked vertex vertically.\n \n \n \n"};