home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 079.lha / Gravity / gravity.doc < prev    next >
Encoding:
Text File  |  1986-11-21  |  2.6 KB  |  71 lines

  1.                                                 10-OCT-1987
  2.  
  3.  
  4.      Well, here it is! (Finally) This version can accept all options
  5. and parameters from the command line. Also, the first body (the sun)
  6. is not necessarily nailed to the cosmos. By that I mean that the 
  7. first body can be allowed to gain velocity just like the other bodies.
  8. The previous version never allowed the first body to accumulate
  9. velocity. When the first body isn't fixed, the tracking function can
  10. be used to "follow" it keeping it centered on the screen. This should
  11. provide a more accurate simulation than the previous version. Any
  12. data files must be modified to include position and velocity values
  13. for the first body. The load, save and edit functions are not yet
  14. working in this version. The program is still "public domain" and
  15. may be freely distributed.
  16.  
  17.                                       Pete
  18.  
  19.      Command line:
  20.  
  21.      > GRAVITY -<option> -<option> ... -<option>
  22.  
  23.      Some option may be followed by a value
  24.  
  25.      Option   Description         Value    Default
  26.  
  27.      T        Title Bar                    Display title
  28.      R        Trails                       Display trails
  29.      H        High Resolution              Not high resolution
  30.      X        Fixed First Body             First body fixed
  31.      A        Track First Body             First body not tracked
  32.      E        Timeout (seconds)     *      No timeout
  33.      F        File Name             *      "Gravity.Dat"
  34.  
  35.  
  36.  
  37.    Examples:
  38.  
  39.    > gravity -t -h                      (hide title, use high resolution)
  40.    > gravity -x -a -e 20                (movable first body, tracking first
  41.                                          body, timeout in 20 seconds)
  42.    > gravity -f gravity3.dat            (use data file "gravity2.dat")
  43.    > gravity -t -e 200 -f example_file  (hide title, timeout in 200 seconds,
  44.                                          use data file "example_file")
  45.  
  46.  
  47. /*
  48.  *  Gravity V3.0          July 29, 1987
  49.  *
  50.  *  This program simulates planets in orbit around a star.
  51.  *  See  "Computer Recreations"
  52.  *       SCIENTIFIC AMERICAN, January 1986.
  53.  *
  54.  *  Data file format:
  55.  *
  56.  *  (The (0,0) point is at the center of the screen.)
  57.  *  Input format (all float values) :
  58.  *      Gravitation Constant, Time Step, Display Scale
  59.  *      X Pos P1, Y Pos P1, X Vel P1, Y Vel P1, Mass P1
  60.  *      X Pos P2, Y Pos P2, X Vel P2, Y Vel P2, Mass P2
  61.  *      X Pos P3, Y Pos P3, X Vel P3, Y Vel P3, Mass P3
  62.  *      . . .
  63.  *
  64.  *
  65.  *  Author:
  66.  *    Peter A. Giancola              CompuServ ID: 76337,2542
  67.  *    8005 Mandan Road #101
  68.  *    Greenbelt, Maryland 20770-2156
  69.  *    (301) 345-0118
  70.  */
  71.