home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / GA / GA028.ZIP / READ.ME < prev    next >
Text File  |  1986-08-27  |  7KB  |  149 lines

  1.  
  2.                         HOPALONG
  3.                         Version 1.1
  4.                         August 27, 1986
  5.  
  6.  
  7.  
  8. (****************************************************)
  9. (* COPYRIGHT (C) 1986 by Kevin McCarty.             *)
  10. (* All commercial use prohibited.                   *)
  11. (* Permission is granted for copying, distribution, *)
  12. (* adaptation, and incorporation into other works,  *)
  13. (* but for personal or educational use only,        *)
  14. (* and this notice is to be preserved.              *)
  15. (****************************************************)
  16.  
  17.  
  18.         Files Included: 
  19.  
  20.         READ.ME                 This is it 
  21.         HOPALONG.COM            Program file 
  22.         HOPALNG7.COM            Same program, compiled with 8087 
  23.                                 support, for the impatient. 
  24.         HOPALONG.PAS            Turbo Pascal source plotting driver
  25.         PLOT.INC                Graphics machinery
  26.         HOP.PAS                 The function to be iterated
  27.  
  28.         The program displays succesive iterates of a mapping 
  29. function from the plane to the plane.  The particular function is 
  30. described in the Computer Recreations column in the September 
  31. 1986 issue of Scientific American (titled "Wallpaper for the 
  32. Mind"), where it is attributed to Barry Martin at Aston 
  33. University in Birmingham, England.  Specifically--
  34.  
  35.         X  <-   Y - sign(X) * sqrt(abs(B * X - C))
  36.  
  37.         Y  <-   A - X
  38.  
  39.         The initial setup prompts should be pretty self-
  40. explanatory.  The program allows you to specify values for the 
  41. coefficients A, B, and C;  the program defaults to one of the 
  42. sets of values suggested in the Sci. Amer. article, namely 
  43.  
  44.         A = -3.14
  45.         B =  0.3
  46.         C =  0.3
  47.  
  48.         The starting values of X and Y are 0. You also specify 
  49. the plotting window in terms of X and Y coordinates, allowing you 
  50. to zoom in on fine details.  All points are calculated, but only 
  51. those falling within the plot window are displayed (obviously). 
  52.  
  53.         Because of the way user input prompts are handled, you 
  54. can change the plot window without disturbing the values of the 
  55. coefficients A, B, & C, by just hitting carriage return when 
  56. prompted for them. 
  57.  
  58.         After you have specified all the inputs, the program 
  59. switches to a suitable graphics mode and starts plotting.  It 
  60. will continue to plot forever, if left alone.  If you're watching 
  61. in color, the colors will change every several thousand 
  62. iterations.  When in graphics mode, you can cycle back to change 
  63. coefficients or plotting window, by striking any key not defined 
  64. in the setup display. 
  65.  
  66.         You can exit the program from graphics mode, after 
  67. becoming sufficiently bored with the drab scenes, by hitting the 
  68. Esc key.  (The only polite way to exit the program is from 
  69. graphics mode; the Esc key doesn't do anything in the setup 
  70. display.) If you become dizzy, Control Break will also bail you 
  71. out, provided your are seated at the time. 
  72.  
  73.         As an aid in helping to set the plotting window, you can 
  74. get a grid to plot on top the figure in the graphics display, by 
  75. hitting the letter 'G' (or 'g').  If you were paying attention to 
  76. all those numbers back in the setup screen, you will have noticed 
  77. that some of them told what the X and Y spacing of the grid dots 
  78. was going to be.  Those of you who rushed headlong past this 
  79. information in your mad rush to see the neat stuff will have to 
  80. to return to the setup screen.
  81.  
  82. ----------------------------------------------------------------
  83.         CHANGES IN VERSION 1.1
  84.  
  85.       - Cleaned up and reorganized the code some. A separate 
  86.         include file now contains all details pertaining to the 
  87.         specific function under study.  Substantially revised 
  88.         and expanded the graphics driver in PLOT.INC. 
  89.  
  90.       - The Color Graphics Adapter (CGA) is supported now,
  91.         (but there has only been limited testing).  You get to choose
  92.         which graphics mode you want, allowing you to trade off
  93.         resolution for many dazzling colors.  The graphics mode 
  94.         to be used will be displayed, as well as the text mode.
  95.         If these don't look right to you, you now can bail out
  96.         while you still have your cursor.  Sorry, no PCJr support
  97.         yet, but it shouldn't be that hard to adapt the source for that.
  98.  
  99.       - The plot coordinates have been rotated by 45 degrees to
  100.         make the symmetry axis of the patterns vertical.  Much nicer.
  101.  
  102.       - During color plotting, if you touch the space bar, the 
  103.         palette values are cycled through all possible values 
  104.         supported by the graphics mode in effect.  This gives rise
  105.         to the "waterfall effect", which some people claim can 
  106.         generate a quite startling three-dimensional animation effect.
  107.         It's at least good for dazzling the socks off someone you're
  108.         trying to impress.  Just tape down the space bar, or lean a 
  109.         brick against the keyboard-- don't forget to wear your 
  110.         airtight goggles.
  111. ----------------------------------------------------------------
  112.  
  113.  
  114.         I've included the source code for several reasons:
  115.  
  116.         1) Not because I'm particularly proud of it, but if you 
  117. had to wait for it to be perfect before I released it, I'd have 
  118. all the fun and you wouldn't have any, for a long time.  For 
  119. example, the code in PLOT.INC works, but could benefit from a 
  120. rewrite (it's in the midst of being expanded and generalized). 
  121.  
  122.         2) Very few people (not even me) will be satisfied with 
  123. the way I've handled the sequencing of colors (they should change 
  124. in a different sequence, more or less often, etc., etc.)  This 
  125. way, if you don't like it, it's your fault. 
  126.  
  127.         3) Martin's function is only a few lines.  All the rest 
  128. of the code is there to make it easy to look at it.  This nifty 
  129. tool should not be confined to only Martin's function, although 
  130. it's worth many days study.  This same machinery can be used to 
  131. study 
  132.         -Mandelbrot sets
  133.         -Julia sets
  134.         -arbitrary 2-dimensional maps, for example the "Henon 
  135.          attractor", a so-called "strange attractor", which is 
  136.          associated with the equations
  137.          X  <=  1 + B*Y - A*X*X         (A = 1.4)
  138.          Y  <=  X                       (B = 0.3)
  139. I'll expand on these references in a later version.
  140.  
  141.         4) If you make improvements and corrections, you'll be 
  142. more inclined to send them on to me, 
  143.  
  144.         Kevin McCarty
  145.         7544 Fallenleaf Lane
  146.         Cupertino, CA 95014
  147.  
  148.  
  149.