home *** CD-ROM | disk | FTP | other *** search
/ Chestnut's Multimedia Mania / MM_MANIA.ISO / games / stars / stars.doc < prev    next >
Text File  |  1991-09-26  |  11KB  |  266 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                 Are the Stars Random?
  10.  
  11.                The original author is;
  12.  
  13.                                   Philip McLaughlin
  14.                                  712 Roberts Street
  15.                                   Denton, TX 76201
  16.  
  17.           and the original program and article appeared in Hot CoCo
  18.           Magazine, May 1984.  Philip may no longer live at this address in
  19.           the event anyone writes to him.
  20.  
  21.                I have  converted the  program to  the PC  with EGA  640x350
  22.           resolution graphics. The original program  for the Color Computer
  23.           allowed the change from a text screen to a graphics screen
  24.           without clearing the graphic screen so you could view the
  25.           activity. On the  PC to change from  SCREEN 0 (text) to  SCREEN 2
  26.           (high resolution  graphics and  80 column text)  the screens  are
  27.           first cleared. The program  runs okay but the current  display is
  28.           erase and  the program picks  up at the  right place but  it only
  29.           shows new stars.
  30.  
  31.                There  are  EGA and  VGA screens  one of  which is  then EGA
  32.           640x350 SCREEN 9. It is possible to use up to seven (7) pages per
  33.           screen using SCREEN ,,0,0  to view SCREEN  9,,,0 and to write  to
  34.           SCREEN 9,,0 and to change  to SCREEN 9,,1,1. You can  move, write
  35.           back and forth,  all without destroying  anything on the two,  or
  36.           more, screens.
  37.  
  38.                It is not  possible to BSAVE  and BLOAD EGA  screens, or  at
  39.           least I do not know a way around this limitation, and the
  40.           original program allowed this.  You could save the screens  every
  41.           so many generations (FOR  .. NEXT loop to 1000=1  generation) and
  42.           then show it  as a slide show  loading each screen in  succession
  43.           and covering many  hours, even days,  worth of displays. So  this
  44.           option has been  changed to save the graphic  locations in a file
  45.           that is about 85,000 bytes long and is displayed using the
  46.           program VIEW.EXE.
  47.  
  48.                Since the original program was written for a 255x192  screen
  49.           and 1000 stars (48.96 ratio), I  converted the current version to
  50.           640x350  and 4575 stars (48.96 ratio). On my 12mhz turbo 80286 AT
  51.           this is about 1.5  minutes per generation. On a PC at 4.77 mhz it
  52.           would be somewhere  around fifteen  minutes per generations.  The
  53.           CoCo  version, poked  to a  higher  processing speed,  took about
  54.           eight minutes per slide.
  55.  
  56.                It is my suggestion to let this program run over a couple of
  57.           days or something just  to see what it  produces. Of course  this
  58.           depends on the running time of your system and the amount of free
  59.           disk  space. I did  this several times  with when I  had my Color
  60.           Computer. I let it run until my  three drives were full of slides
  61.           (no hard drive) and the program terminated. I had it programed to
  62.           check for free  space and switch  drives as needed and  terminate
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.           when the last one was full.
  76.  
  77.                The programs runs just like the original program, no
  78.           modifications  were  made but  to  the screen  locations  and the
  79.           number of stars.
  80.  
  81.                When the program starts you are prompted for <1> Pure
  82.           random, <2> Weighted or Prejudiced or <3> Exit  Program. Pressing
  83.           <1>  fills the screen with random stars. I altered this option so
  84.           that the PSET  is 1 to 25  for PRESET. In other words  I turn off
  85.           twenty-five random positions (pixels, on or off) while turning on
  86.           only one position (pixel). The author just turned on pixels until
  87.           the screen went all white without doing any dying stars. Pressing
  88.           any key exits  this option. If you  press <2> you advance  to the
  89.           next prompt.
  90.  
  91.                You are prompted for <1> Change parameters or  press <ENTER>
  92.           to continue. If you are going to use the defaults just  press the
  93.           enter or return key. If you press <1> see the "Change Options."
  94.  
  95.                The  next prompt is  <1> Formation  of clusters  from random
  96.           distribution or <2> Growth  from fixed points. Press <1>  and the
  97.           program  loads  4,575  random screen  locations  and  the program
  98.           begins. If you  press <2>  the program pick  location 220,90  and
  99.           400,220 for the two starting points.
  100.  
  101.                The program starts  the display, either two fixed  points or
  102.           4,575 random screen positions. If using the random option at this
  103.           point it might not be 4,575 actual stars  since some choices with
  104.           be for positions already  chosen, turning on the same  pixel more
  105.           than one time.
  106.  
  107.                                    Change Options
  108.  
  109.                Turning  the program you can press  any key to change to the
  110.           interrupt  screen showing the  current state of  the program. You
  111.           are prompted for <1> Change options,  <2> Continue program as is,
  112.           and <3> Exit  the program.  If you press  <2> the screen  changes
  113.           back to the graphic display and the program proceeds as before.
  114.  
  115.                Time of all calculations and the  time of each generation is
  116.           displayed. This time may or may not be 100% correct. The timer on
  117.           the  Color Computer  could be  set to  any value and  rolled over
  118.           every 18 minutes. The timer on  the PC can not be altered.  I can
  119.           handle the time  with good  results except when  the timer  rolls
  120.           over at midnight. This can happen anytime on the  PC since people
  121.           do or do not set the time, set wrong time, system  clocks are set
  122.           to the wrong time, etc. So whenever the timer rolls over empty my
  123.           current variable so the most that could  be lost is the length of
  124.           time that it  take to create one generation or if  you are in the
  125.           "Change Options"  display screen when  roll over takes  place and
  126.           adjusted time for the interrupt is lost.
  127.  
  128.                Pressing <1> and  you are  prompted for "Change  interaction
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.           radius. Change to." You  then type in a new value.  The program's
  142.           default is "2"  and pressing  <ENTER> without a  value keeps  the
  143.           default. I did not see any suggestions from the author on
  144.           suggested values of RG. "Line 1420, where RG is used,
  145.           approximates  Newton's  Inverse  Square Law  in  a  probabilistic
  146.           manner. Note too that there are  many ways to weight the distance
  147.           that do not involve extracting a square root."
  148.  
  149.                Next you are  prompted to "Input  1 to unplot `dying'  stars
  150.           (pixels). Otherwise they  remain on the  screen." I have no  idea
  151.           why this option was presented and wonder why anyone would want to
  152.           leave dead stars looking like lives ones and still on the screen?
  153.           I might consider making them a different color so  that you could
  154.           tell them from live stars and am not even sure about that. If you
  155.           stepped back and looked  at the universe from infinity,  your eye
  156.           would not be able to see dead stars.
  157.  
  158.                Next  you are prompted  "Press <1> for  automatic storage to
  159.           disk or <ANY  OTHER KEY> to  continue. If you  press <1> you  are
  160.           then prompted for "Save to disk  every how many generations." You
  161.           can have it  save every generation but  at 40,000 bytes  per file
  162.           this can add  up. Every 5 or  ten are good figures. If  you input
  163.           nothing the default is not to  save the screens or not to  change
  164.           the previous data if this is a change option.
  165.  
  166.                Next  you are prompted "Normally input  "1". This causes new
  167.           points to be  calculated as a  probability function of the  whole
  168.           buffer." I always use "1" myself.
  169.  
  170.                Now  you  are back  to the  <1>  Formation of  clusters from
  171.           random distribution or  <2> Growth from  fixed points. Press  <1>
  172.           and  the program  loads  4,575 random  screen  locations and  the
  173.           program begins. If you press <2> the program pick location 220,90
  174.           and 400,220 for the two starting points.
  175.  
  176.                .... and the program proceeds ....
  177.  
  178.                                      VIEW SLIDES
  179.  
  180.                Run the  program, VIEW.EXE. You are prompted  for <1> Slides
  181.           or <2> Exit program. Pressing <1> you are prompted for the number
  182.           of generations. This value must no exceed the number of
  183.           generations produced by the program STARS.EXE.
  184.  
  185.                Next you are prompted for every how many generations. If you
  186.           saved every  5th generation then  you must type in  "5" and press
  187.           <ENTER>.  The  program  cannot display  every  2nd  generation if
  188.           STARS.EXE  saved every 5th  generation. The  VIEW program  has an
  189.           error handler in it that loops back  to the main screen on errors
  190.           in the even  you typed in the wrong number of  slides or the step
  191.           rate.
  192.  
  193.                There is no  timer in the viewer and each slide is loaded in
  194.           and replaces the  current screen. On my  PC-AT, 12 mhz and  40 ms
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.           hard drive  it takes about 15 seconds to load in a slide from the
  208.           disk file. You system may be faster or slower so please be
  209.           prepared for some delay which is  avoidable considering the way I
  210.           had to save  the screens. There is  a single, short, tone  at the
  211.           end of each slide  and a multiple, longer,  tone when the  slides
  212.           are finished. Pressing any key returns you to the main screen.
  213.  
  214.                If you  have access  to  the magazine  you can  see all  the
  215.           guidelines and  if I had a page scanner  I would have included it
  216.           in this  documentation. I  have included  the basic and  compiled
  217.           versions. Without a compiler the program will not run since Basic
  218.           gives  me an illegal  function call on  SCREEN 9. It  is at least
  219.           there for you to look at and see what math is used in the
  220.           program.
  221.  
  222.  
  223.                               James Huckabey
  224.                               3621-A Fraser Street
  225.                               Bellingham, WA 98226
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.