home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / 11CHAOS.ZIP / CHAOS.TXT next >
Encoding:
Text File  |  1989-02-05  |  1.5 KB  |  43 lines

  1. Recently, PBS aired a special on Chaos.  It prompted me to write this little
  2. program to demonstrate the "Order of Chaos".
  3.  
  4. Imagine the following scenario:
  5.  
  6. You have a 2 dimensional plane.  There are three points on the plane.  One
  7. is on the upper left corner, the second is on the upper right, and the third
  8. is on the bottom centered.  Something like this:
  9.  
  10. 1---------------------------2
  11.  \                         /
  12.    \                     /
  13.      \                 /
  14.        \             /
  15.          \         /
  16.            \     /
  17.              \ /
  18.               3
  19.  
  20. Suppose we select a point within the triangle at random and use this position
  21. as a starting point.  Select a random number between 1 and 3.  Now, imagine a
  22. line between the starting point and the number selected.  Halfway, between the
  23. two draw another point.  Use this new point as the starting point and continue
  24. until you are exhausted.
  25.  
  26. You would probably expect that the trangle would eventually fill up.  But
  27. wait!  Run the program called pointp.exe.  This will speed things up a bit
  28. a show you the "Order of Chaos".
  29.  
  30. -------------------------------------------------------------------------------
  31.  
  32. This program was written on a 286(8) clone with a HGC.  Let me know how it runs
  33. on your machine.  The graph drivers have been linked into a unit called
  34. drivers and are included in the run-time code.  Source is also included for
  35. anyone who wants to modify it.
  36.  
  37. This program is hereby released into the public domain...
  38.  
  39. Ben Diss
  40. Plantz: ID1119
  41. CIS# 71270,341
  42.  
  43.