home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / graf / plotfrac.zip / README.TXT < prev   
Text File  |  1988-02-04  |  9KB  |  189 lines

  1.  
  2.  
  3.  
  4.  
  5.             P L O T F R A C . C
  6.  
  7.                                  By
  8.                           Ronald F. Merts
  9.                         Copyright (c) 1987, 1988
  10.                      Oklahoma Digital Systems
  11.  
  12.  
  13.  
  14.     This software is provided as a freeware service to the public.
  15.     You may distribute, use and modify the program freely; although,
  16.     I do request that you distribute this short documentation file
  17.     only with the original files.
  18.  
  19.  
  20.     The ARChive file PLOTFRAC.ARC should contain the following files:
  21.  
  22.     GRAFIX.H         The include file for using the GRAFIX functions.
  23.     GRAFIX.C         Source code for the GRAFIX functions.
  24.     PLOTFRAC.EXE     Fractal Graphics Program (CGA & EGA support)
  25.     PLOTFRAC.C       Source code for the above program.
  26.     README.TXT       This file.
  27.  
  28.     The program can plot functions in as little as 2 hours; or some take
  29.     as long as 8 hours.  These times should be substantially reduced with
  30.     the installation of an 8087 or 80287 math co-processor.
  31.     When I changed from a 8088-2 to an NEC V20-8 I achieved a 30% time
  32.     savings.  One thing to remember is that the closer you get to the
  33.     Mendlebrot set, the longer the iterations take; and as you zoom in
  34.     closer to the boundary, your plots can begin to take quite a long time.
  35.     The programs are compiled with the 8087/8087-emulator routines in them;
  36.     so if you don't have an 8087 installed the emulation routines will be
  37.     used; and if you do have an 8087 installed, it will be used.
  38.  
  39.     The program's inputs should be fairly straight forward; but there are
  40.     a few I will discuss.  The parameter M is used as a boundary check.  If
  41.     X*X + Y*Y is greater than M and you haven't made K (I'll get to
  42.     parameter K in a minute) passes; you can plot a color -- or white if
  43.     you're in 640 X 200 CGA mode.  Choose M carefully; I suggest no more
  44.     than 100; or you may be getting a LARGE black region.  The parameter
  45.     K is how many colors you have available.  I suggest lying and saying
  46.     you have 200 or so (I have had it down to 80 and changed the M to be 40
  47.     and produced satisfactory results).  Why?  Well if you tell it you have
  48.     4 colors; then you will be allowing it to only make 4 passes through
  49.     the function; and your results will be far less than satisfactory.
  50.  
  51.  
  52.  
  53.  
  54.                                 Page 2
  55.  
  56.  
  57.     The program is not very smart about it's file access; so I don't
  58.     suggest trying anything tricky with the filenames.  I usually name
  59.     them something like MAP_1.PIC and let it go to work.  A word of
  60.     warning; the 320 X 200 plots take up 64038 bytes of disk space,
  61.     the 640 X 200 plots require 128038 bytes of disk space, and the 640 X 350
  62.     plots take up 224038 bytes of disk space.  You can reduce this by up to
  63.     95% or so by using the program ARC or something similar.  You can't
  64.     read them while they are in the archive; but you can store 8-12 of them
  65.     in one archive that takes up as much or less space than one 320 X 200
  66.     plot.   But it is your disk-space...
  67.  
  68.     I have also included several extra features not documented in the
  69.     program.  These; although not sophisticated, do help.  After a plot
  70.     is completed, it is automatically saved.  After being saved, or after
  71.     loading an old picture; you may do several things to it.  Here is a
  72.     list of the commands.  All you do is press the key, do NOT press return
  73.     unless you want to exit the picture.  Note:  <CR> means press the,
  74.     return or "enter" key; <ESC> means press the "Esc" or "Escape" key.
  75.  
  76.     Key (Lower,Upper)                   Description
  77.     -----------------------------------------------
  78.      p,P                          Changes the Color Palette.
  79.      b,B                          Changes the background color between
  80.                                   any of the 16 colors.
  81.      d,D                          Dump picture to Epson or IBM com-
  82.                                   patable dot-matrix printer.
  83.      c,C                          Chop picture (*)
  84.      <CR>,<ESC>                   Return to main menu.
  85.  
  86.     (*) See below.
  87.  
  88.  
  89.  
  90.  
  91.  
  92.                                 Page 3
  93.  
  94.  
  95.     The P command allows you to change between the IBM CGA's 2 color
  96.     palettes (Red, green, Yellow and the background color or, white,
  97.     Cyan, Magenta and the background color).
  98.  
  99.     The B command allows you to change the background color to any of
  100.     the 16 supported background colors of the IBM CGA.  This command
  101.     and the P command are only available with the 320 X 200 mode plot.
  102.  
  103.     The D command allows you to print the Black region on any Epson
  104.     compatable printer...including the IBM dot matrix printer, Seikosha
  105.     SP-1000, Epson MX-80 with Graftrax, RX and FX.  If your picture has
  106.     no black; then nothing will be printed...sorry I haven't had time
  107.     with college to figure out shading yet...(note...yet!)
  108.  
  109.     The C command (this is bizarre) allows you to remove every-other
  110.     vertical column starting in column 1.  Why?  Well, I was wanting to
  111.     zoom in on a region; and rather than count those dots I decided to
  112.     just thrash the picture since it could be reloaded easily.  If you
  113.     are wanting to find a new starting value it can be helpful; then all
  114.     you have to do is calculate a starting value based on the column num-
  115.     ber of the screen.
  116.  
  117.     There is also an H command; but it does not work properly.  Remember
  118.     that the screen location 0,0 is the upper left of the screen; while
  119.     it is preferable to have it in the lower left.  The GRAFIX routine
  120.     observes the screen locations (0,0 is upper left, 319,199 is lower
  121.     right in 320 X 200 mode).  It is up to the "plotfrac()" function to
  122.     handle the conversion.
  123.  
  124.     If you have any comments, I can be reached via 300/1200 baud modem
  125.     (8 bits, 1 stop, no parity) at (405) 799-2638 -- The Revelstone BBS.
  126.     I am User #2.
  127.  
  128.  
  129.  
  130.  
  131.  
  132.                                 Page 4
  133.  
  134.  
  135.                    ACKNOWLEDGEMENTS
  136.  
  137.  
  138.     I want to thank Dr. A. L. Merts of the Los Alamos National
  139.     Laboratory (my father) for providing me the inspiration for these
  140.     programs and pictures; and for giving me the chance to enhance my
  141.     education my attending college....Thank you father and mother.
  142.  
  143.     H.-O. Peitgen and P. H. Richter for the book THE BEAUTY OF FRACTALS,
  144.     "Images of Complex Dynamical Systems".
  145.  
  146.  
  147.  
  148.  
  149.  
  150.                                 Page 5
  151.  
  152.  
  153.                               PROGRAMMING NOTES
  154.  
  155.     These notes are for those who are interested in digging into the
  156.     programs and tinkering.  These all were written in Microsoft 'C'
  157.     4.00 with IBM PC-DOS 3.10.  Because of the large amount of arrays
  158.     and other storage I chose to compile these as Large Models
  159.     (allow multiple 64K data segment, and multiple 64K program segments).
  160.     These were linked with the Microsoft Overlay Linker V3.51 with the
  161.     /NOIGNORECASE option ( /NOI -- The function plotfrac uses K and k as
  162.     variables; and the GRAFIX routines use upper and lower case variables
  163.     as well).
  164.  
  165.     The GRAFIX functions utilize the ROM BIOS Int 10h functions to draw
  166.     graphics directly to the 320 X 200 4-color or b/w, or the 640 X 200
  167.     monochrome graphics pages of the IBM CGA (Color Graphics Adapter), as
  168.     well as to the 640 X 350 16-color page of the EGA via the BIOS Interrupt.
  169.     In the save_pic() function you will see some manipulating of the byte
  170.     values on the screen just before saving; this is to prevent any 00's
  171.     being written; which really seemed to irritate the Microsoft 'C' disk
  172.     write routines.  They are automatically adjusted by the load_pic()
  173.     function before they are redrawn.
  174.  
  175.  
  176.     With Version 3.00, I stopped using the BIOS extension windowing routines
  177.     which were previously used by this program.  For this reason, I am no
  178.     longer able to supply all of the source code.  The new windowing routines
  179.     are from Vitamin-C, a commercially available library.  With a little bit
  180.     of studying, one should be able to figure out the routines used an either
  181.     work around them, or replace them with their own.  I am working on at
  182.     least one more revision to the program which will allow me to directly
  183.     write to the EGA video, without using the BIOS.  This should further
  184.     speed up the program as the EGA's BIOS is not especially fast.  The
  185.     GRAFIX routines are fully supportive of the majority of the CGA and EGA
  186.     Graphics Modes.  They may be used to do just about anything involving
  187.     graphics.  They are not fancy, and they could definitely stand some sort
  188.     of "clean-up"; but they do work reliably.
  189.