home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / pascal / HENON.ZIP / HENON.DOC < prev    next >
Encoding:
Text File  |  1987-02-22  |  5.9 KB  |  118 lines

  1.  
  2.  
  3.  
  4.                      ********************************
  5.                      **                            **
  6.                      **                            **
  7.                      **         HENON.DOC          **
  8.                      **                            **
  9.                      **    Program Documentation   **
  10.                      ********************************
  11.  
  12.  
  13.  
  14. The program  for generating  these Henon mappings, HENON2.PAS, is written in
  15. Turbo Pascal for an  IBM PC.   It  uses the  graphics commands  contained in
  16. Turbo Pascal.  The Include file called GRAPH.P is a Turbo-supplied file with
  17. graphics subroutines.   The  only place  you need  this is  for the graphics
  18. screen save.   This program uses high-resolution monochrome graphics (640 by
  19. 200).  It would be easy to alter this for  low-resolution color  graphics so
  20. the  orbits  could  be  differentiated  by  color.    If  you  have  an 8087
  21. coprocessor with the Turbo-87  compiler,  this  program  will  run  about 30
  22. percent faster,  and the  precision will extend from 11 places to 16 places.
  23. This can be of real value for high  magnification.   This is  explained more
  24. fully in the text.
  25.  
  26. To use this program:
  27.  
  28. HENON2 will  ask for  plotting parameters as described below.  In each case,
  29. you can obtain the default by responding with a carriage return.   After you
  30. run the  program once,  a carriage return will give you the last value used.
  31. Note that Pascal requires real numbers between -1 and 1  to be  input with a
  32. leading zero.  Thus, the number .35 must be input as 0.35.
  33.  
  34. NOTE THAT COMMAS ARE NEITHER NECESSARY NOR ACCEPTED BETWEEN MULTIPLE INPUTS.
  35.  
  36. The Parameters of a Plot:
  37.  
  38. 1.  The angle A in radians (between 0.0 and pi).
  39.  
  40. 2.  The axis along which the increments are to take place.  The options are:
  41. Axis of Symmetry (each plot has an axis of symmetry which makes  an angle of
  42. A/2 with  the X axis), X Axis, Axis of Choice (choose any starting point and
  43. the program will compute  the axis),  and No  Axis (starting  values will be
  44. obtained from arrays).  The default is the Axis of Symmetry.
  45.  
  46. 3.   A starting  point for  the first orbit.  The default is (0.098  0.061).
  47. If the selected axis is Axis of Symmetry, you only need one coordinate.  The
  48. program computes  the other  value.   For the  sake of convenience, when the
  49. Axis of Symmetry lies between 0  and  pi/4,  the  program  assumes  that the
  50. starting point  entered is the X coordinate; then the program computes the Y
  51. value.  For an axis between pi/4 and pi/2, the program asks for the Y value.
  52.  
  53. 4.  The increment for the initial points.  This increment is  measured along
  54. the  selected  axis.    If  No  Axis  is selected, this has no bearing.  The
  55. default is 0.05.
  56.  
  57.  
  58. 5.  The window of the plot in the horizontal (X) direction.  The  default is
  59. -1.2  1.2.  The program will compute a nice window size automatically if the
  60. values  entered  are  0.0    0.0.    This   is  especially   convenient  for
  61. magnifications where the window may be difficult to choose.
  62.  
  63. 6.   The window  of the  plot in the vertical (Y) direction.  The default is
  64. -1.2  1.2.
  65.  
  66. 7.  The number of orbits to be plotted.  The default is 25.
  67.  
  68. 8.  The number of points in each orbit.  The default is 500.                
  69.    
  70. NOTE: The  orbits of  any plot  can be advanced manually by pressing any key
  71. while the plot is in progress.  This allows you  to skip  over uninteresting
  72. areas.
  73.  
  74. At the end of each plot a menu appears with 10 items:
  75.  
  76. (F1) NEW PLOT (CARRIGE RETURNS WILL REPEAT CURRENT VALUES)
  77. (F2) SELECTED ORBITS OF CURRENT PLOT      (F3) RESTORE PREVIOUS PLOT
  78. (F4) SAVE PARAMETERS OF CURRENT PLOT      (F5) SAVE SCREEN OF CURRENT PLOT
  79. (F6) RETRIEVE STORED PARAMETERS           (F7) RETRIEVE STORED SCREEN
  80. (F8) MERGE CURRENT PLOT WITH STORED PLOT  (F9) CHANGE OPTIONS  (F10) QUIT
  81.  
  82. Item  F2  has  a  number  of  subitems  which  are  designed  to  facilitate
  83. exploration of a plot.   One  of these  is an  interactive search  where you
  84. indicate the window of the search area with the cursor keys.
  85.  
  86. In many  cases it is better to save the parameters of a plot with F4 than it
  87. is to save the actual screen with F5.  (Of  course both  can be  saved since
  88. the menu reappears after a save.)  The parameters are saved in a text format
  89. which you can later examine and alter if  you wish.   These  parameter files
  90. contain only about 1K bytes while the graphics screens take about 16K bytes.
  91. The parameter files contain all  the  information  necessary  to  recreate a
  92. plot.   In addition  they contain  a listing of the actual orbits (up to the
  93. maximum you established with MAXORBIT, currently set at 48).   In most cases
  94. this is  redundant information,  but it  can be quite useful because you can
  95. then manipulate these arrays to eliminate certain unwanted orbits or add new
  96. ones.    One  of  the  most  powerful options along these lines is the MERGE
  97. option F8.  This allows you  to combine  two distinct  parameter plots.   It
  98. does not  matter if  they have  different scales or even different A values.
  99. The merge simply merges the two  arrays  and  uses  the  paramters  from the
  100. current plot.
  101.  
  102. The menu  item Options  (F9) allows you to turn on and off a number of items
  103. such as the GRID lines, the  TEXT on  the screen,  the MARKS  which show the
  104. starting values.   It also allows you to adjust the number of decimal places
  105. displayed on the screen.  This is necessary for extended magnification.
  106.  
  107. The Plots
  108.  
  109. The plots in photos 1 through 3 in the article  were obtained  with an Amdek
  110. DXY-100  flat-bed  plotter.    (Similar  to  Roland  DXY  100).  The X and Y
  111. coordinates of the points were sent to a file, and  then a  separate program
  112.  
  113. fed these  to the  plotter.   Because the plots are done one point at a time
  114. and the points are spread out into cycles, the plots can take up to 4 hours.
  115. To speed  things up,  I first  sorted the points in X and then Y values with
  116. DBase III.  This allowed me to generate a plot in about 20 minutes.
  117.  
  118.