home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / pmattrac / read.me < prev   
Text File  |  1990-10-14  |  2KB  |  68 lines

  1. PMATTRAC is released to the public for whatever they would like to do
  2. with it.  The code is not the best in programming in the world, more
  3. just something to fiddle around with.  If you have any suggestions for
  4. improvement, additions, etc, feel free to send them to me.  You can
  5. reach me at:
  6.  
  7.     BIX:    cwills      (preferred method)
  8.     USMail:
  9.         Cheyenne Wills
  10.         12 W. Locust St.
  11.         Mechanicsburg, Pa. 17055
  12.  
  13.  
  14. PMATTRAC was written to play around with some of the graphics functions
  15. within PM.  The primary goal was to see how hard it would be to divorce
  16. the graphics drawing routines from the PM window management routines.  I
  17. wanted to be able to resize the window and such, so items like WM_SIZE
  18. had to be handled.  The method that I chose to do this was to have a
  19. "shadow" presentation space, where the drawing routines would do all
  20. their "drawing" on.  And at certain points, the shadow PS would be
  21. copied over to the window's PS.  The method works, but is slow at times
  22. due to the fact that the entire PS bitmap is copied.
  23.  
  24. As stated above, the code isn't the best in the world!  It was written
  25. to play around with some ideas.  It also doesn't follow Microsoft's
  26. Hungarian notation (something that I despise), nor does it really follow
  27. what I guess is traditional window's programming.  Some of the code was
  28. loosely modeled off of code in Charles Petzold's PMMANDEL program and
  29. several other programs of his.
  30.  
  31. About what PMATTRACT does on the screen.
  32.  
  33. PMATTRAC really does do something... there are several little attractors
  34. that are interesting.  I just picked three formulas from some of the
  35. books that I have laying around (a good collection of attractors is in
  36. "Exploring the Geometry of Nature" by Edward Rietman).
  37.  
  38. The three attractors chosen are: Henon attractor, duffing oscillator
  39. and a KAM curve.
  40.  
  41. Henon:
  42.     x(n+1) = y(n) + 1 - ax(n)^2
  43.     y(n+1) = bx(n)
  44.  
  45. Duffing:
  46.     dx/dt = y
  47.     dy/dt = -(ax^3 + cx + bx) + f cos(theta)
  48.  
  49. KAM curve:
  50.     x(n+1) = x(n) cos(A) - (y(n) - x(n)^2) sin(A)
  51.     y(n+1) = y(n) cos(A) + (y(n) - x(n)^2) cos(A)
  52.  
  53.  
  54.  
  55.  
  56. Items for improvement and additions
  57.  
  58. Well.. there are some obvious things that could be added:
  59.    o zoom-in/out
  60.    o speed
  61.    o printing
  62.    o options (like color)
  63.    o adding a 3d transform (the Lorenz attractor comes to mind as using this)
  64.  
  65.  
  66. Cheyenne
  67.  
  68.